1. Need to download MySQL
: http://dev.mysql.com/downloads/mysql/
2. Upload the downloaded RPM package to CentOS 7 (I am the opt directory under the root)
3. Install MySQL
Yum Install /opt/mysql5. 7.16 /*
Yum automatically resolves dependencies.
4. Let the data initialize
mysql_install_db --datadir=/var/lib/mysql
5. Change the user and group that the MySQL file belongs to MySQL
chown Mysql:mysql *-R #-r recursion
6. Start MySQL
Systemctl Start Mysqld.service
7. Find MySQL initial password
Logging in to MySQL requires a password, but we don't know what its initial password is.
The initial password can be found in the home directory.
8. Go to MySQL
Mysql-u root-p #根据提示输入密码
The first time you enter MySQL, it will let you change your password.
Alter User User by ' 123456 ';
MySQL installation is complete.
#################################################
Create User 'Root'@'192.168.100.135'Identified by '123456'; #创建用户Grant All Privileges onMysql.* to 'Root'@'192.168.100.135'; #给指定用户添加权限
Centos 7 Installation mysql5.7