今天裝完mysql , 利用 mysqladmin -uroot password 設定完密碼後
mysql -uroot -p
居然跳出
[root@zabbix zabbix-2.0.8]# mysql -u root -p
Enter password:
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
[root@zabbix zabbix-2.0.8]# /etc/init.d/mysqld stop
從此就進不去了 .. 只好再請出google , 解決方法如下
1 2 3 4 5 6 7 8 |
>/etc/init.d/mysqld stop >mysqld_safe --skip-grant-tables & >mysql -u root mysql>use mysql; mysql>UPDATE user SET Password=PASSWORD('1234') where USER='root'; mysql>FLUSH PRIVILEGES; mysql>exit >/etc/init.d/mysqld restart |
打完收工 !!!
(Visited 42 times, 1 visits today)