次のコマンドで root パスワードをリセットした後でも、MySQL にログインできません: (追加情報を提供するためにリストされている他のコマンド)
# sudo dpkg-reconfigure mysql-server-5.1
# mysql -u root -p
Enter password:
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
# telnet 127.0.0.1 3306
Trying 127.0.0.1...
telnet: Unable to connect to remote host: Connection refused
# ps -Aw |grep mysql
26522 ? 00:00:00 mysqld
# /etc/init.d/mysql start
Rather than invoking init scripts through /etc/init.d, use the service(8)
utility, e.g. service mysql start
Since the script you are attempting to invoke has been converted to an
Upstart job, you may also use the start(8) utility, e.g. start mysql
アップデート:
# sudo mysqladmin -u root password 123
mysqladmin: connect to server at 'localhost' failed
MySQL が正常に動作していないようです
更新: Ubuntu で MySQL 5.1 を使用しています。リモート アクセスを有効にするために my.cnf を変更するまでは問題ありませんでした。変更を元に戻しましたが、問題は解決しませんでした! (何か元に戻すのを忘れたのかもしれません!)
アップデート:
# service mysql status
mysql start/running, process 26650
# /etc/init.d/mysql status
Rather than invoking init scripts through /etc/init.d, use the service(8)
utility, e.g. service mysql status
Since the script you are attempting to invoke has been converted to an
Upstart job, you may also use the status(8) utility, e.g. status mysql
mysql start/running, process 26650