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
After the download is good two rpm files;
the second step: to upload files to the linux rpm in
Step 3: Start the installation server
-ivh 使用rpm文件安装必带参数
--nodeps --force 表示不检查依赖强制安装
Step four: Install the client
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
Step Six: mysql mysql need to determine before entering the service starts successfully
systemctl status mysqld.service
Here I start mysql service encountered an error when the display has not started up;
报错提示: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
and then use a command to restart the mysql service
perfect start!
Then use the front view is out of the initial password to log in mysql
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;
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
deleted two rows of data;
modify localhost as the wildcard%;
results follows it;
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
end!