ホームページ  >  記事  >  データベース  >  Accessdeniedforuser'root'@&#

Accessdeniedforuser'root'@&#

WBOY
WBOYオリジナル
2016-06-07 15:55:21855ブラウズ

$mysqld --skip-grant-tables $ mysql -u root mysql$mysql UPDATE user SET Password=PASSWORD('my_password') where USER='root';$mysql FLUSH PRIVILEGES; $ /etc/init.d/mysql restart $ mysql -u root -pEnter password: my_password 在执行命令前,kil

$mysqld --skip-grant-tables
<pre class="brush:sql;">$ mysql -u root mysql
$mysql> UPDATE user SET Password=PASSWORD('my_password') where USER='root';
$mysql> FLUSH PRIVILEGES;
<pre class="brush:sql;">$ /etc/init.d/mysql restart
<pre class="brush:sql;">$ mysql -u root -p
Enter password: my_password
在执行命令前,kill掉mysql的进程
声明:
この記事の内容はネチズンが自主的に寄稿したものであり、著作権は原著者に帰属します。このサイトは、それに相当する法的責任を負いません。盗作または侵害の疑いのあるコンテンツを見つけた場合は、admin@php.cn までご連絡ください。