One: Install MySQL1. Check if MySQL and install.
Rpm-qa | grep mysql//This command will check if the MySQL database is already installed on the operating system
RPM-E MySQL//normal Delete mode
Rpm-e–nodeps mysql//Brute Force Delete mode, if you use the above command to delete, prompted to have other dependent files, then use this command can be strongly deleted
PS: After the deletion we can pass Rpm-qa | grep mysql command to see if MySQL has been uninstalled successfully!!
2. Yum install MySQL
Yum List | grep MySQL//view the downloadable version of the MySQL database available on Yum
Yum install-y mysql-server mysql mysql-devel//install MySQL mysql-server mysql-devel
3. Start and stop MySQL
Service Mysqld Start/stop/restart
4. Modify the password of the default MySQL root user
/usr/bin/mysqladmin-u root password ' new-password '//Set password for root account
Two: MySQL code modification (utf-8)1. Modify the configuration file
VI/ETC/MY.CNF//Edit the master configuration file for MySQL. If not, go to/usr/share/mysql copy one (MY-MEDIUM.CNF) can
[Client]
Default-character-set=utf8
[Mysqld]
Collation-server = Utf8_unicode_ci
init-connect= ' SET NAMES UTF8 '
Character-set-server=utf8
2. Verify that our code is changed
Mysql>show VARIABLES like ' character% ';
Mysql>show variables like ' collation% ';
Three: MySQL's authorization1. About this kind of stuff, just go to Google under the relevant article to see it OK.
http://jiony.iteye.com/blog/1672912
http://cnzxp521.iteye.com/blog/1332876
http://freeloda.blog.51cto.com/2033581/1253898
2. The specific
GRANT all privileges on . To ' root ' @ ' 192.168.15.115 ' identified by ' 123 ' with Grant option;//authorization
GRANT all privileges on . To ' root ' @ ' 192.168.15.% ' identified by ' 123 ' with Grant option;//authorization
Revoke alter on . from ' root ' @ ' 192.168.15.115 ' identified by ' 123 ';//Cancel Authorization
FLUSH privileges; Refresh
Yum installs MySQL, MySQL code modification (utf-8), and MySQL access to other machine IP and permissions limits