MySQL workbench不能连接到服务器

时间:2024-03-29 10:39:29

报错:

Your connection attempt failed for user ‘root’ from your host to server at 127.0.0.1:3306:Access denied for user ‘root’@'localhost’

MySQL workbench不能连接到服务器

更改

只要将连接设置中的Hostname “127.0.0.1”改成:“::1”

MySQL workbench不能连接到服务器

即可成功连接到数据库。

MySQL workbench不能连接到服务器

官方解释

Note

The server uses the host cache only for nonlocal TCP connections. It does not use the cache for TCP connections established using a loopback interface address (for example, 127.0.0.1 or ::1), or for connections established using a Unix socket file, named pipe, or shared memory.