ps -ef |grep mysql
[root@wangpeng ~]# cd /usr/local/
[root@wangpeng local]# wget https://cdn.mysql.com/archives/mysql-5.6/mysql-5.6.45-linux-glibc2.12-x86_64.tar.gz
[root@wangpeng local]# tar -zxvf mysql-5.6.45-linux-glibc2.12-x86_64.tar.gz
[root@wangpeng local]# rm -rf mysql-5.6.45-linux-glibc2.12-x86_64.tar.gz
[root@wangpeng local]# mv mysql-5.6.45-linux-glibc2.12-x86_64/ mysql
[root@wangpeng local]# groupadd mysql
[root@wangpeng local]# useradd -r -g mysql mysql
[root@wangpeng local]# groups mysql
[root@wangpeng local]# cd mysql/
[root@wangpeng mysql]# chown -R mysql:mysql ./
[root@wangpeng mysql]# ./scripts/mysql_install_db --user=mysql --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data
[root@wangpeng mysql]# chown -R root:root ./ && chown -R mysql:mysql data
#可能报错,需要重命名/etc/mycnf文件
[root@wangpeng mysql]# ./support-files/mysql.server start
[root@wangpeng mysql]# ./bin/mysqladmin -u root password '000000'
[root@wangpeng mysql]# ./bin/mysql -h127.0.0.1 -uroot -p000000
#开启远程登录
mysql> grant all privileges on *.* to root@'%' identified by '000000';
mysql> flush privileges;
[root@wangpeng /]# cp /usr/local/mysql/support-files/mysql.server /etc/init.d/mysqld
[root@wangpeng /]# chmod +x /etc/init.d/mysqld
[root@wangpeng /]# chkconfig --add mysqld