[MySQL] Access denied !!

版主: stnet253

回覆文章
tony
文章: 585
註冊時間: 2012-02-26, 07:04
聯繫:

[MySQL] Access denied !!

未閱讀文章 tony »

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

系統是 Ubuntu 8.041 server + MySQL

密碼是安裝 Ubuntu 系統時設定的

但是用 phpMyAdmin - 2.11.3deb1ubuntu1 但可以正確登入 @@

不過問題已解決, 解決方式如下..

# service mysql stop
# mysqld_safe --user=mysql --skip-grant-tables --skip-networking &

Starting mysqld daemon with databases from /var/lib/mysql
mysqld_safe[5523]: started

# mysql -u root mysql
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.0.51a-3ubuntu5.1 (Ubuntu)

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql>


進去了, 再設定一次密碼..

mysql> UPDATE user SET Password=PASSWORD('xxxxxxxxxxxxxxx') where USER='root';
mysql> FLUSH PRIVILEGES;

mysql> \q

# service mysqld restart

# mysql -uroot -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 7
Server version: 5.0.51a-3ubuntu5.1 (Ubuntu)

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> \q
回覆文章

誰在線上

正在瀏覽這個版面的使用者:Semrush [Bot] 和 1 位訪客