# rpm -qa | grep mysql --Check whether MySQL has been installed before.
# rpm -e --nodeps mysql-libs-5.1.71-1.el6.x86_64 --Execute delete statement
# rm -rf /var/lib/mysql*--Aftermath
# rm -rf /usr/share/mysql*
# cd /usr/local
# wget http://mirror.centos.org/centos/6/os/x86_64/Packages/libaio-0.3.107-10.el6.x86_64.rpm
# rpm -ivh libaio-0.3.107-10.el6.x86_64.rpm
# cd /usr/local
# wget https://dev.mysql.com/get/archives/mysql-5.6/MySQL-5.6.26-1.linux_glibc2.5.x86_64.rpm-bundle.tar
# tar -xf MySQL-5.6.26-1.linux_glibc2.5.x86_64.rpm-bundle.tar
# rpm -ivh MySQL-server-5.6.26-1.linux_glibc2.5.x86_64.rpm
# rpm -ivh MySQL-client-5.6.26-1.linux_glibc2.5.x86_64.rpm
# more /root/.mysql_secret
# service mysql restart
# mysqladmin -uroot -pFeyU2YjwMcAw9Nv0 password 'root'--Change root password to root
# mysql -uroot -proot --Test login
# cp -rp /usr/share/mysql/my-default.cnf /etc/my.cnf
# Add below mysqld
init-connect='SET NAMES utf8'
character-set-server = utf8
# service mysql restart
# mysql -uroot -proot --Verification is successful
# show variables like 'character%';
# service iptables stop
# chkconfig iptables off
# mysql -uroot -proot
# grant all privileges on *.* to root@'%' identified by 'root' WITH GRANT OPTION;
# flush privileges;
Recommended Posts