2009-06-23
■[tips][mysql]MySQLのrootパスワードを忘れた時の対処法
備忘録メモ。
某所のMySQLデータベースをバックアップ兼ねて、まるっとテストサイトに持ってきたわけです。
まるっと。
そしたらまぁ、当然というかなんというか、MySQLのrootパスワードが分からなくて、あんなことやこんなことをするのに困ってしまって、(´ε`;)ウーン…とかなってたので、rootパスワードをセットし直す方法を調べたのでメモ。
# /etc/init.d/mysql stop # mysqld_safe --skip-grant-tables & # mysql -u root
で。
> use mysql; > update user set password=PASSWORD('NewPassword') where User='root'; > flush privileges;
として、パスワード変更ができる。
あとは、MySQLをセーフモード止めて
# /etc/init.d/mysql stop # /etc/init.d/mysql start
で、かんりょ。
トラックバック - http://d.hatena.ne.jp/Yudoufu/20090623/1245740703
リンク元
- 24 http://search.yahoo.co.jp/search?p=?????í????泣?????&search.x=1&fr=top_ga1&tid=top_ga1&ei=UTF-8
- 15 http://www.php.gr.jp/
- 8 http://www.google.co.jp/search?hl=ja&client=firefox-a&rls=org.mozilla:ja:official&hs=Sbi&q=au+入力モード&btnG=検索&lr=lang_ja
- 7 http://hex6.net/blog/?p=15
- 7 http://reader.livedoor.com/reader/
- 7 http://www.google.co.jp/search?sourceid=navclient&hl=ja&ie=UTF-8&rlz=1T4GFRC_jaJP206JP206&q=mysql セーフモード パス
- 7 http://www.thinkit.co.jp/article/143/4/3.html
- 5 http://gmail.1o4.jp/imap.html
- 4 http://ke-tai.org/blog/2008/09/19/inputmode/
- 4 http://www.akiyan.com
