Skip to content


MySQL rootパスワード設定

このエントリーをはてなブックマークに追加
はてなブックマーク - MySQL rootパスワード設定
Share on Facebook
Post to Google Buzz
Bookmark this on Yahoo Bookmark
Bookmark this on Livedoor Clip
Share on FriendFeed
Share on GREE

 MySQLインストール直後はrootのパスワードが無しになっている為、これを変更する。

  1. ログイン
  2. $ mysql -u root mysql
  3. パスワード変更
  4. > SET PASSWORD FOR root@localhost=PASSWORD('hoge');
  5. ログアウト
  6. > exit;
  7. パスワード無しでログイン出来ないことを確認
  8. $ mysql -u root mysql
    ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
  9. パスワードありでログイン出来ることを確認
  10. $ mysql -u root -phoge mysql
    ※)-pとhogeの間はブランク無し


関連するかもしれない記事



他のブログも読む

Posted in MySQL.

Tagged with , .


0 Responses

Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.



Some HTML is OK

or, reply to this post via trackback.

*