before trying yum ,rpm, compiling and installing MySQL, after a long period of testing, the simplest and most efficient way is to use a binary installation.
The system used this time is CentOS 6.4 ,mysql version is mysql-5.6.26-x86_64 bit.
: Http://pan.baidu.com/s/1bfknFo
For the installation command
1, switch path
cd/usr/local/
2, unzip the file
Tar-xfmysql-advanced-5.6.26-linux-glibc2.5-x86_64.tar.gz
3, File rename
Mv mysql-advanced-5.6.26-linux-glibc2.5-x86_64 MySQL
4, Authorization limit
Chown-rmysql.mysql/usr/local/mysql
If you are prompted without a MySQL user, create a msyql user
Groupadd MySQL
Useradd-g Mysqlmysql
5, copy my-default.cnf file to etc
Cpsupport-files/my-default.cnf/etc/my.cnf
Chownmysql:mysql/etc/my.cnf
6, initialize the data
Chmod-r 755scripts/mysql_install_db
scripts/mysql_install_db--user=mysql--basedir=/usr/local/mysql--datadir=/usr/local/mysql/data--defaults-file=/ Etc/my.cnf
7, copy mysql.server to native
CP Support-files/mysql.server/etc/init.d/mysqld
chmod 700/etc/init.d/mysqld
8. Modify The/etc/profile file to configure the MySQL installation path
Vi/etc/profile
Exportpath=/usr/local/mysql/bin: $PATH
Or
echo "Exportpath=/usr/local/mysql/bin: $PATH"
Is the modification takes effect
Source/etc/profile
9. start MySQL
/etc/init.d/mysqldstart
set the MySQL root user password
/usr/local/mysql/bin/mysqladmin-u root password ' new-password '
/usr/local/mysql/bin/mysqladmin-u root-h localhost.localdomain Password ' New-password
Or
Set password for ' root ' @ ' localhost ' =password (' 123456 ');
mysqladmin-u root-p Password "123456"
Enter Password:"original initial password"
One, initialize the test data
/usr/local/mysql/bin/mysql_secure_installation
log in to MySQL
mysql-uroot-p123456
Add Boot start
Chkconfig--addmysql
Create a MySQL user
CREATE USER ' boomhope ' @ ' localhost ' identified by ' 123456 ';
15, Authorized Login
GRANT all privileges the Boomhope to ' boomhope ' @ ' host '
installing MySQL 5.6.26 (binary installation)