Open up the mysql command line client.
type in the following lines PERFECT, if you mess up, you have to start all over by restarting the command line client.

mysql>use mysql
mysql>select user, host, password from user;
# Now you should see that u have 3 entries
+-----------------------------+
| user | host | password |
+-----------------------------+
| root | localhost | |
| root | 127.0.0.1 | |
| | localhost | |
+-----------------------------+

mysql> delete from user where host="localhost" and user="";
mysql> update user set password=password("root") where user="root";
mysql> flush tables;
mysql> flush privileges;
mysql> quit

Now the mysql table should be updated and everything fixed.

相关文章:

  • 2021-05-02
  • 2021-05-13
  • 2021-12-07
  • 2021-09-26
  • 2021-08-31
  • 2021-03-27
  • 2022-01-11
  • 2021-11-26
猜你喜欢
  • 2022-12-23
  • 2021-11-13
  • 2021-06-25
  • 2022-12-23
  • 2021-09-24
  • 2022-12-23
  • 2021-10-17
相关资源
相似解决方案