MySQL的root管理者設定密碼的問題!!! - Linux

Rosalind avatar
By Rosalind
at 2010-07-11T13:00

Table of Contents


鳥哥的網址
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鍵
出來的卻不一樣
麻煩各位高手解惑哩

--
Tags: Linux

All Comments

Oscar avatar
By Oscar
at 2010-07-11T23:00
你手指key進去的密碼一定不是 "your.password" 吧
Ida avatar
By Ida
at 2010-07-14T11:39
Enter password: 這部分不是要打我自己想設得密碼嗎????
Caroline avatar
By Caroline
at 2010-07-16T14:45
我了解你的意思哩.......哈哈...我一直想說照著做

MySQL啟動的問題

Agnes avatar
By Agnes
at 2010-07-10T22:20
看著鳥哥的網站 剛剛想說架設Apache + MySQL + PHP 目前 Apache + PHP 算是完成了 現在剩下MySQL 鳥哥版的是這樣 [rootatlinux ~]# /etc/init.d/mysqld start # 如果是初次使用這個指令來啟動,你的 /var/lib/mysql ...

cygwin下找不到pkg-config的script

Lily avatar
By Lily
at 2010-07-10T10:18
請教一下 我出現了一些設定上的問題 我在cygwin環境下執行軟體的./config 在我的bin資料夾裡面已經有pkg-config.exe了 但是執行的時候軟體卻跟我抱怨他找不到pkg-config的script 他顯示請我確定一下path裡面是不是存在 或者設定一下PKG_CONFIG的環境變 ...

kdenlive 改善

Oliver avatar
By Oliver
at 2010-07-10T10:01
http://ppt.cc/IcuN 照著爬文上的方法做了 可是聲音依然會延遲 請問有人有在使用kdenlive嗎? 聲音延遲我不知道該怎麼剪 (幾乎都是剛開啟不會延遲,點到影片的時間軸就會開始延遲) 以下是我電腦資訊 OS Ubunut 10.04 amd64 CPU AMD Athlon ...

CentOS掛在VMware下的PHP問題

Doris avatar
By Doris
at 2010-07-10T08:06
※ 引述《ckshman ()》之銘言: : 先說一下 : 小弟我家是浮動IP : 約有四到五個 : 目前小弟我已經把CentOS架設在VMware下哩 : 然後小弟我在終端機那邊打 : yum install httpd mysql-server php php-devel php-mysql : 很自然的 ...

CentOS掛在VMware下的PHP問題

Barb Cronin avatar
By Barb Cronin
at 2010-07-10T01:10
先說一下 小弟我家是浮動IP 約有四到五個 目前小弟我已經把CentOS架設在VMware下哩 然後小弟我在終端機那邊打 yum install httpd mysql-server php php-devel php-mysql 很自然的就把 Apache + PHP + MySQL 掛上去 ...