标签:tran cut with x86_64 option lin bst cnp bundle
# rpm -qa|grep mysql
mysql-libs-5.1.71-1.el6.x86_64
# rpm -e --nodeps mysql-libs-5.1.71-1.el6.x86_64 //卸载
# find / -name mysql//有mysql文件夹的话,把mysql的文件夹删掉
https://dev.mysql.com/downloads/mysql/5.6.html#downloads
# tar -xvf MySQL-5.6.41-1.el6.x86_64.rpm-bundle.tar
MySQL-client-5.6.41-1.el6.x86_64.rpm
MySQL-shared-compat-5.6.41-1.el6.x86_64.rpm
MySQL-test-5.6.41-1.el6.x86_64.rpm
MySQL-server-5.6.41-1.el6.x86_64.rpm
MySQL-devel-5.6.41-1.el6.x86_64.rpm
MySQL-shared-5.6.41-1.el6.x86_64.rpm
MySQL-embedded-5.6.41-1.el6.x86_64.rpm
rpm -ivh MySQL-devel-5.6.41-1.el6.x86_64.rpm
rpm -ivh MySQL-server-5.6.41-1.el6.x86_64.rpm
rpm -ivh MySQL-client-5.6.41-1.el6.x86_64.rpm
没有ERROR日志,说明安装成功;
# service mysql start
Starting MySQL.Logging to ‘/var/lib/mysql/C5-3_SOA23.cnpc.com.cn.err‘.
[ OK ]
# cat /root/.mysql_secret
# mysql -u root -p
# mysql -uroot -p
mysql: unknown variable ‘sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES‘
# vi /etc/my.cnf
把 sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES 这句话注释掉;
mysql> use mysql
ERROR 1820 (HY000): You must SET PASSWORD before executing this statement
mysql> SET PASSWORD = PASSWORD(‘123456‘);//123456是新密码
mysql> GRANT ALL PRIVILEGES ON *.* TO ‘root‘@‘%‘ IDENTIFIED BY ‘123456‘ WITH GRANT OPTION;
mysql> flush privileges;
标签:tran cut with x86_64 option lin bst cnp bundle
原文地址:https://www.cnblogs.com/lijinshan950823/p/9603659.html