2

I can't figure this one out. I can't connect to a server using MySQL Workbench, I tried any kind of connection methods. The error message I get is

Failed to Connect to MySQL at AT 127.0.0.1:3306 with user root

Invalid for this platform protocol requested(MYSQL_PROTOCOL_SOCKET)

enter image description here

Lorena Sfăt
  • 215
  • 2
  • 7
  • 18
  • Did you verify if the server is running? Are you able to connect from the `mysql` command-line client? – kums Nov 21 '14 at 18:13
  • Have you installed for the first time, or is this a previously good system, and are now unable to connect. If its a new system, can you confirm MySQL is started? – Greg Lafrance Nov 21 '14 at 18:13
  • I'm not sure if it's ok, but I used xampp to open my server for localhost and it worked. Should I open it differently for this one? I know I'm a newbie :S – Lorena Sfăt Nov 21 '14 at 18:29

3 Answers3

6

I ran into the same problem, in my case I originally created the connection with the "Local Socket/Pipe" option selected in the "Connection Method" drop down. Trying to switch back to "Standard (TCP/IP)" did not work and caused the error mentioned by OP. I had to delete the connection and start over by selection "Standard (TCP/IP)" from the start. The connection was successful after that.

willscott
  • 61
  • 1
  • 2
3

To solve this problem you must check the "Others" field in Advanced tab

If you had the connection stored with a socket option you will find a "socket=." (or anything similar)

Delete it

e.g. http://prntscr.com/k63pua

0

This is a very unusal error message which I haven't seen before, especially on Windows. It has probably to do with how the server is installed. As a newbie it would definitely be the best choice to use the Windows Installer for all required parts. This will install the server properly too.

By using xampp you are on your own to check whether a server is installed and running as a service, as well as the proper configuration. For troubleshooting watch my video on Youtube where I tried to explain most common pitfalls for beginners.

Note: you can open the connection without actually being connected. In that case MySQL Workbench allows to do all those things that don't require a valid server connection, e.g. log file viewing, config file editing, service start/stop etc. Use this to check your server's configuration. Make sure it accepts TCP/IP connections (there's also a short section in the video about this).

Update:

  1. Downvoter, please add a comment why you think my answer is bad.
  2. Re-reading the error message I got another idea: could it be that you used local socket/named pipe for the connection? If so try with normal TCP/IP.
Mike Lischke
  • 48,925
  • 16
  • 119
  • 181