Home > Database > Mysql Tutorial > body text

Accessdeniedforuser'root'@&#

WBOY
Release: 2016-06-07 15:55:21
Original
855 people have browsed it

$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
Copy after login
在执行命令前,kill掉mysql的进程
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!