Go to official website to download
http://www.mysql.com/downloads/
I put it under the/root/download.
Unzip first
Unzip V47187-01.zip tar zxvf mysql-advanced-5.6.21-linux-glibc2.5-x86_64.tar.gz-c/usr/local/store/
Switch to MySQL parent directory
CD/USR/LOCAL/STORE/MV mysql-advanced-5.6.21-linux-glibc2.5-x86_64 MySQL
Create a MySQL user
CD mysqlgroupadd mysqluseradd-g MySQL MySQL
Change the owner of the MySQL directory
Chown-r Mysql:mysql/usr/local/store/mysql
Initializing the database
./scripts/mysql_install_db--basedir=/usr/local/store/mysql--datadir=/usr/local/store/mysql/data--user=mysql
Modify the configuration file This profile is used to make use of very little memory. Modify parameters According to the actual situation
MySQL configuration file
Start the MySQL service
Support-files/mysql.server Startbin/mysql-uroot
Change the password on the MySQL command line
Set Password=password (' 123456 ');
Restart MySQL Service
Support-files/mysql.server restart
Verify Password
Bin/mysql-uroot-p
Startup error can be viewed in the data directory under the {host name}.err file
CentOS Installation mysql5.6