Use rmp package installation mysql

Note that this tutorial is only for valid to mysql-5.7 version (part of the command does not apply in other versions)

The first step: the official website to download the rpm package of good mysql
Here Insert Picture Description
After the download is good two rpm files;
the second step: to upload files to the linux rpm in
Here Insert Picture Description
Step 3: Start the installation server
Here Insert Picture Description

-ivh 使用rpm文件安装必带参数
--nodeps --force  表示不检查依赖强制安装

Step four: Install the client
Here Insert Picture Description
the same and server; Note: You must install the server and then install the client!
Step Five: After installing the initial password to view

grep password /var/log/mysqld.log

Here Insert Picture Description
Step Six: mysql mysql need to determine before entering the service starts successfully
Here Insert Picture Description

systemctl status mysqld.service

Here I start mysql service encountered an error when the display has not started up;
Here Insert Picture Description

报错提示:Job for mysqld.service failed because the control process exited with error code. See "systemctl status mysqld.service" and "journalctl -xe" for details.

Solution: Delete / var / lib / mysql directory
Here Insert Picture Description
and then use a command to restart the mysql service
Here Insert Picture Description
perfect start!
Then use the front view is out of the initial password to log in mysql
Here Insert Picture Description
the next step is to modify your password, mysql-5.7-based mechanisms, for the first time into the mysql password must be changed or can not do anything;
Here Insert Picture Description
use the set password = password ( 'password') ; modify the landing mysql password!
The last step we need to user in this table user, host, authentication_string the three fields changed a bit, so that all hosts using the root user on the host can access to the mysql
time just entered the mysql values of these three fields should be the following figure this:

then we need to mysql.session and mysql.sys two lines to root localhost delete and modify this line is%; means that all hosts can access
Here Insert Picture Description
deleted two rows of data;
Here Insert Picture Description
modify localhost as the wildcard%;
results follows it;
Here Insert Picture Description
and then we modify the configuration to refresh content

flush privileges;

Finally, add a service we need to set up mysql open automatically open; you do not need to manually open each time the
Here Insert Picture Description
end!

Published 10 original articles · won praise 1 · views 206

Guess you like

Origin blog.csdn.net/yang_x_b/article/details/102831543
Recommended