我道歉。。我知道这个问题以前被问过很多次,但我试过很多建议,根本找不到解决办法。
问题是,当我尝试在workbench上连接时,会出现以下错误:
“无法使用用户root在127.0.0.1:3306连接到mysql”
但如果我跑了 shell> mysqladmin version
,我得到:
mysqladmin Ver 8.42 Distrib 5.7.19, for Linux on x86_64
Copyright (c) 2000, 2017, 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.
Server version 5.7.19
Protocol version 10
Connection Localhost via UNIX socket
UNIX socket /var/run/mysqld/mysqld.sock
Uptime: 32 sec
Threads: 1 Questions: 3 Slow queries: 0 Opens: 107 Flush tables: 1 Open
tables: 26 Queries per second avg: 0.093
以下命令也可以正常运行:
shell> mysqld (service is running)
shell> mysql (login on Server)
wb上的“newconnection”设置为:
Connection Method: Standard (TCP/IP)
Parameters.Hostname: 127.0.0.1 - Port: 3306
Parameters.Username: root
... (next values are by Default)
我的系统是ubuntu 14.04 lts。
提前谢谢。
1条答案
按热度按时间t5fffqht1#
我已经将[user].[plugin]值上的配置从mysql.server更改为mysql\u native\u password(针对该用户),并且可以从wb正常登录。这是工作!
这个答案,解决了我的问题。