安装mysql

1、rpm -qa|grep mysql

mysql-libs-5.1.47-4.el6.x86_64

2、yum -y remove mysql-libs-5.1.47-4.el6.x86_64

3、rpm -ivh mysql-server.rpm 

4、客户端

 rpm -ivh MySQL-client-5.6.11-2.el6.x86_64.rpm 


5、mysql

ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)

6mysqld_safe --user=mysql --skip-grant-tables --skip-networking

UPDATE user SET Password=PASSWORD('newpassword') where USER='root';

mysql

修改user表


7、ERROR 1820 (HY000): You must SET PASSWORD before executing this statement

 SET PASSWORD = PASSWORD('123456');在设置一次密码就可以了


你可能感兴趣的:(安装mysql)