MySQLエラー「Access denied for user ‘root’@’localhost’」

MySQLエラー「Access denied for user ‘root’@’localhost’」

WordPressのデータベースをインポートしようとしたらエラーが出ました。

[root@localhost tmp]# mysql -u[ユーザ] -p[パスワード] [DB名] < ダンプファイル
Warning: Using a password on the command line interface can be insecure.
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)

この場合の対応手順を記録しておきます。

 

MySQLを一旦停止して権限を使用せず起動します。

[root@localhost tmp]# service mysqld stop
mysqld を停止中: [ OK ]
[root@localhost tmp]# mysqld_safe --skip-grant-tables &

 

これで解消しました。

 

参考サイト様

http://www.goofoo.jp/2011/11/1457

Comments

No comments yet. Why don’t you start the discussion?

コメントを残す

メールアドレスが公開されることはありません。 が付いている欄は必須項目です