精華區beta FreeBSD 關於我們 聯絡資訊
==> 在 [email protected] (暗黑貴公子) 的文章中提到: > ※ 引述《[email protected] (Strategist)》之銘言: > MySQL 剛安裝好是沒有密碼的, 所以啟動 mysql daemon 後 > 請於 localhost 輸入 mysql -u root 登入 mysql server > 第一次登入後有幾件事情要做 (於 mysql command 下) 重點是現在連用mysql -u root,MySQL server還是不給連... :< 接下來您說的動作根本就沒法施展 :~ > 1.增加允許連線之額外 Hosts > mysql> use mysql; /* 使用 MySQL database */ > mysql> Insert Into user(Host, User, Password) > -> values('YourHostName', 'LoginName', PASSWORD('LoginPassword')); > mysql> flush privileges; > 2.更改 root 密碼 > mysql> use mysql; /* 使用 MySQL database */ > mysql> update user set Password=PASSWORD('YourPassword') where User='root'; > mysql> flush privileges; > 更改密碼後, 下次登入請輸入 > mysql -u root -p /* 提示輸入密碼, -p 代表登入使用者有密碼保護 */ > 或是 > mysql -u root --password='YourPassword' -- * Post by strategist from telnet.hinet.net * Origin: ★ 交通大學資訊科學系 BBS ★ <bbs.cis.nctu.edu.tw: 140.113.23.3>