重新启动后解决
我试图连接到mysql工作台上的本地主机,并得到了以下消息:
在localhost:3306:
无法连接到MySQL服务器的用户“root”连接尝试失败:3306
请:1检查MySQL是否运行在地址本地主机2检查MySQL是否可在端口3306上访问(注意: 3306是默认的,但这是可以更改的)3检查用户根是否有权从您的地址连接到本地主机(MySQL权限定义客户端可以连接到服务器和机器)4确保您在需要时提供密码,并使用正确的密码从您连接的主机地址连接本地主机。
但是,当我在终端上尝试时,连接是成功的:
$ mysql -u root -p -h localhost -P 3306
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 13
Server version: 8.0.19 MySQL Community Server - GPL
Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> quit
我的工作台配置有问题吗?
发布于 2020-02-19 10:56:37
您可以尝试ip adresse 127.0.0.1。
https://stackoverflow.com/questions/60277683
复制相似问题