1. Detect whether the system has been installed Mysqsql
Rpm-qa|grep Mysql-i
2. Uninstall if installed
RPM-EF MySQL Package name--nodeps
3. Install your own MySQL
RPM-IVH MySQL server-side software rpm package
RPM-IVH mysql client software rpm package
4. Start MySQL
Service MySQL Start
5. Login to MySQL, modify password, view and modify character encoding
Mysql-u root-p
UpdateUser set Password=password ("root") where user= "root";
Flush privileges;
View character set show variables like '%character% '
Copy the file to the ETC directory, the file name is MY.CNF cp/usr/share/mysql/my-small.cnf/etc/my.cnf
Edit My.cnf File vi/etc/my.cnf
Join Character_set_server=utf8 on the first line of [mysqld]
6. Open 3306 Ports
Iptables-i input-p TCP---dport 3306-jaccept
Save to Firewall service Iptables save
Reboot Firewall service iptables restart
7. Grant root user permission to log on remotely and refresh permissions
Grant all privileges on *.* toroot@ '% ' identified by ' root ' with grantoption;
Flush privileges;