1.环境检测:
检测是否已安装mysql:
# rpm –qa|grep mysql
2.卸载已经有的mysql:
#rpm -e --nodeps mysql-libs-5.1.66-2.el6_3.x86_64
3. 安装mysql5.6
从mysql官网上下载server 和client
#rpm -ivh MySQL-server-5.6.16-1.el6.x86_64.rpm MySQL-client-5.6.16-1.rhel5.x86_64.rpm
4.启动mysl
# service mysql start
修改mysql密码:
#mysqld_safe --user=mysql --skip-grant-tables --skip-networking &
#mysql -u root mysql
mysql> UPDATE user SET Password=PASSWORD('newpassword') where USER='root';
mysql> FLUSH PRIVILEGES;
mysql> quit;
# /etc/init.d/mysql restart # mysql -uroot -p Enter password: