ubuntu下mysqlの'Access denied for user'root'@'localhost'(using password:YES)'を解決
703 ワード
ubuntu下mysqlの'Access denied for user'root'@'localhost'(using password:YES)'を解決
一般的にrootパスワードを再変更すると
解決方法:1./etc/mysql/debianを開きます.cnfファイル、システム管理者のパスワードが格納されています
2.コマンドを入力:
対応するdebianを再入力します.cnfの中の対応するパスワード、管理者の身分で入ります
3.コンソールに入る.次の手順に従います.
もしあなたのmysqlが5.7バージョンになったら
一般的にrootパスワードを再変更すると
解決方法:1./etc/mysql/debianを開きます.cnfファイル、システム管理者のパスワードが格納されています
2.コマンドを入力:
mysql -udebian-sys-maint -p
対応するdebianを再入力します.cnfの中の対応するパスワード、管理者の身分で入ります
3.コンソールに入る.次の手順に従います.
use mysql;update user set password=PASSWORD(' ') where user='root';FLUSH PRIVILEGES;
もしあなたのmysqlが5.7バージョンになったら
password authentication_string ,
update user set
authentication_string=PASSWORD(' ') where user='root';
quit; root