[問題] MySQL的root管理者設定密碼的問題!!!

看板Linux作者時間14年前 (2010/07/11 13:00), 編輯推噓1(102)
留言3則, 2人參與, 最新討論串1/3 (看更多)
鳥哥的網址 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
你手指key進去的密碼一定不是 "your.password" 吧
07/11 13:17, 1F

07/11 15:11, , 2F
Enter password: 這部分不是要打我自己想設得密碼嗎????
07/11 15:11, 2F

07/11 15:12, , 3F
我了解你的意思哩.......哈哈...我一直想說照著做
07/11 15:12, 3F
文章代碼(AID): #1CEL06l3 (Linux)
文章代碼(AID): #1CEL06l3 (Linux)