[問題] MySQL的root管理者設定密碼的問題!!!
鳥哥的網址
http://linux.vbird.org/linux_server/0360apache.php
[root@linux ~]# /etc/init.d/mysqld start
# 如果是初次使用這個指令來啟動,你的 /var/lib/mysql 會建立資料庫。
[root@linux ~]# netstat -tuln | grep ':3306'
tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN
# 底下在測試看能否以手動的方式連上 MySQL 資料庫!
[root@linux ~]# mysql -u root
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 2 to server version: 4.1.20
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> quit
Bye
以上這部分已經順利完成
問題是出在下面部分
鳥哥版的是如此
[root@linux ~]# mysqladmin -u root password 'your.password'
# 從此以後 MySQL 的 root 帳號就需要密碼了!如下所示:
[root@linux ~]# mysql -u root -p
Enter password: <==你必須要在這裡輸入剛剛建立的密碼!
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 4 to server version: 4.1.20
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql>quit
但我的版本卻是如此
[root@124-8-89-25 ~]# mysqladmin -u root password 'your.password'
[root@124-8-89-25 ~]# mysql -u root -p
Enter password:
ERROR 1045 (28000): Access denied for user 'root'@'localhost'
(using password: YES)
密碼我也有打哩
然後按下Enter鍵
出來的卻不一樣
麻煩各位高手解惑哩
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 219.86.170.117
推
07/11 13:17, , 1F
07/11 13:17, 1F
→
07/11 15:11, , 2F
07/11 15:11, 2F
→
07/11 15:12, , 3F
07/11 15:12, 3F
討論串 (同標題文章)
以下文章回應了本文:
完整討論串 (本文為第 1 之 3 篇):