1, you need to download the RPM package first:
Mirror address: http://mysql.mirrors.pair.com/Downloads/
Choose the download according to the different version, I download is:
mysql-server-5.6.20-1.el6.i686.rpm
mysql-client-5.6.20-1.el6.i686.rpm
MYSQL-DEVEL-5.6.20-1.EL6.I686.RPM (This package is spare)
Because the installation of MySQL in RPM mode, then only install the mysql-server is not able to connect to MySQL in command line mode, so also need to install Mysql-client
2, start the installation server side:
Execute command: RPM-IVH mysql-server-5.6.20-1.el6.i686.rpm
After the installation is complete, you will be prompted:
Hint: After installing the mysql-server will randomly generate a root account password, to protect the existence:/root/.mysql_secret here
Tip Two: Install Mysql-server after the first time to connect to MySQL need to modify this default password
After you have identified this, you need to execute the command: Find/-name MySQL to find the installation location of Mysql-server, as follows:
/etc/logrotate.d/mysql
/etc/rc.d/init.d/mysql----Startup files
/usr/share/mysql----include my-default.cnf file
/usr/bin/mysql
/usr/lib/mysql
/var/lib/mysql----Database File storage directory
Then execute: Find/-name my.cnf find the location of the Mysql-server configuration file, as follows:
/usr/my.cnf
Then start Mysql-server, execute:/etc/init.d/mysql start
Prompt to start after successful execution: Ps-el | grep MySQL
The system will list the relevant process information of MYSQLD, indicating that mysql-server installation is successful!
3, install Mysql-client:
Since there is no way to connect to the database under the command line after installing Mysql-server, you need to continue installing mysql-client and execute the command:
RPM-IVH mysql-client-5.6.20-1.el6.i686.rpm
After a while, the system will prompt the installation to succeed, this time, execute:
Mysql-u root-p to connect MySQL, the connection need to enter a password, the password is the previous generation of the random password, the input can be successful!
After entering the MySQL console, execute: show databases;
Find the system prompts need to change the password first, so: first exit the system, and then execute: mysqladmin-u root-p password ' new-passwd '
To change the password, then connect MySQL again, enter the password you just set up, then continue to show databases; command, find success!
4, then there is a question, whether you still need to install the Mysql-devel package?
Try ....
Execution: Rpm-ivh mysql-devel-5.6.20-1.el6.i686.rpm
The prompt installs successfully, then connects the MySQL, executes the show databases; Still can ...!
Google for a moment:
Mysql-devel seems not too necessary ~ ~
Linux under RPM mode installation MySQL