1. System
The premise is to see if the server has a database, the code is as follows:
Rpm-qa |grep "MySQL", if there will be shown below the interface!
2. Database Installation Site
#wget http://dev.mysql.com/get/mysql-community-release-el7-5.noarch.rpm
#rpm-IVH mysql-community-release-el7-5.noarch.rpm
#yum Install Mysql-community-server
3. After successful installation, restart MySQL, the code is as follows
#service mysqld Restart
4. The root account does not have a password after installing MySQL for the first time
Enter the command to start MySQL:
#mysql-uroot
5. To modify the MySQL password, you need to log in to MySQL first, the command after login:
Mysql>set password for ' root ' @ ' localhost ' =password (' newpassword ');
6. View the database encoding:
Mysql>status
7. Modify the encoding format of the database client (other encoding formats are as follows):
Mysql> set Character_set_client=utf8;
8. The database opens a remote connection:
Mysql>grant all privileges The "root" @ '% ' identified by ' 123456 ' with grant option; (Root is username,% is any host, 123456 is the password for the remote connection)
Mysql>flush privileges; (Overloaded system permissions)
mysql>exit;
9. Open 3306 Ports:
Can check online, this method has many kinds of
This blog was posted on Csdn and is now published here for multi-platform communication.
* * Reference URL
Http://www.cnblogs.com/starof/p/4680083.html
CentOS Install MySQL