简体   繁体   中英

MySQL Workbench Cannot Connect to Database Server

I have exactly the same problem as the poster in question 7864276 except that in my case I've verified that the server is actually running, eg, from within MySQL Workbench by right-clicking on Local Instance MySQL and selecting Start Command Line Client. It's only when I select Query Database or double click on Local Instance MySQL that the error message results. One additional piece of information in the error message is that it says "invalid for this platform requested(MYSQL_PROTOCOL_SOCKET)". Everything worked fine until I recently updated MySQL Workbench to version 5.2.47 CE.

Click on Manage Connections. Select Local Instance MySQL. Change Connection Method to Local Socket/Pipe. Test connection succeeds now.

TERMINAL:

sudo mysql -u root ENTER
you password user ENTER
USE mysql; ENTER
UPDATE user SET plugin='mysql_native_password' WHERE User='root'; ENTER
FLUSH PRIVILEGES; ENTER
exit; ENTER
service mysql restart ENTER
you password user again ENTER

finish you terminal, and enter Mysql Workbench, in Mysql Connections "key icon", local instance 3306, and Test connection.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM