很抱歉。我知道这个问题之前已经问过很多次了,但是我尝试了很多建议,却找不到解决方法。
问题是当我尝试在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 。
谢谢。
答案 0 :(得分:0)
我已将 [user]。[plugin]值上的配置从MySQL.Server更改为 mysql_native_password (针对该用户),并从WB登录正常。可行!
这个Answer,解决了我的问题。