首页  >  文章  >  数据库  >  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