Preparatory work:
Install the Yum library and will download a good mysql5.7.16 installation package under the textile/opt directory
One, the mysql5.7.16 5 program files to install (so as not to solve the centos7 of the MARIADB database dependencies)
Yum Install-y/opt/mysql*
Second, restart the MySQL service
#systemctl Restart Mysqld.service
Third, find a temporary password for the MySQL service
Find a temporary password is generated for [email protected]:?????
Copy the temporary password down
Iv. entering MySQL
#mysql-u root-p Enter password:n:u=eek,l2_k
Alter user ' root ' @ ' localhost ' identified by ' [email protected] '; Reset your password, or you cannot create a user
show databases; View the database;
Create user ' aa01 ' @ ' 192.168.100.134 ' identified by ' [email protected] '; Create a user for 192.168.100.134, that is, the user created can only log on 192.168.100.134
Create Database Kong; Create a Kong database
Grant all privileges the xyq.* to ' aa01 ' @ ' 192.168.100.140 '; Give a user the right to specify a database, * represent all tables
V. Completion
————————————————————————————————————————————
mysql_install_db--datadir=/var/lib/mysql//Initialize Database
RPM package installed, can be seen with RPM-QA, if you want to find out if a package is installed, with Rpm-qa | grep "Software or package name"
Yum method installed, can be found with Yum list installed, if it is to find the specified package, with Yum list installed | grep "software name or package name"
Installation and configuration of MySQL under Centos 7