Reference article: http://www.linuxidc.com/Linux/2013-12/93507.htm
1. Download the MySQL installation file firstI am downloading the latest version of the 5.6
2.
install MySQL in rpm modeIn a rhel system, the "mysql-shared-compat-5.6.15-1.el6.i686.rpm" Compatibility Pack must be installed before the server and client can be installed, or an error will be installed. RPM-IVH mysql-shared-compat-advanced-5.6.26-1.el6.x86_64.rpm # Rhel Compatibility Pack RPM-IVH Mysql-server-advanced-5.6.26-1.el6.x86_64. RPM # MySQL server program, I install this when there is a warning, and finally add the parameters--force--nodeps mandatory installationRPM-IVH mysql-client-advanced-5.6.26-1.el6.x86_64.rpm # MySQL client program RPM-IVH mysql-devel-advanced-5.6.26-1.el6.x86_ 64.RPM # MySQL Library and header file Rpm-ivh mysql-shared-advanced-5.6.26-1.el6.x86_64.rpm # MySQL shared library
3. Modify MySQL default passwordCat/root/.mysql_secret # Get random passwords generated when MySQL is installed
Service MySQL start # start MySQL Services
Mysql-uroot-p # Enter MySQL, use the random password obtained before
SET PASSWORD for ' root ' @ ' localhost ' = PASSWORD (' PASSWORD '); # Set the root account password to password on the MySQL command line
Quit # quit MySQL command line
Service MySQL Restart # restart MySQL Services
4. Last note MySQL under Linux, the default table name is case-sensitiveOpen the Profile/etc/my.cnf (Ubuntu is in the/etc/mysql/my.cnf file) and after [mysqld]
Lower_case_table_names=1
0, case-sensitive; 1, no distinction
RHEL 6.4 Installing MySQL with MySQL installation files