Forums

"Lost connection to MySQL server at 'reading initial communication packet', system error: 0" when connecting via MySQLWorkbench

Hi,

I know that this question has been asked many times but I have yet to see a conclusive answer and set of instructions in order to get MySQLWorkbench to connect to a MySQL server on pythonanywhere. The fact that I'm getting this error in particular seems to indicate that it's not an authentication problem but, instead, a connectivity problem of some sort. Can anybody provide a solid list of instructions and/or configuration settings required to get this working? The default instructions simply do not work as is. Something key is missing. Thanks!

All of your login attempts have been with the wrong username. Your username is Doogra, not doogra. This has resulted in your IP being banned for an hour. It should be unbanned in around 40 minutes.

Well, that was silly of me. However, I've tried again using the correct userid and am still denied. (I'm sure the password is correct). Thanks for your prompt response! :-)

Any chance that you can check the logs to see what they're saying now? Everything should be capitalized, but I still can't authenticate. Thanks.

You're using the wrong password. You need to use the password that you use to log into PythonAnywhere for the SSH tunnel and your database password to connect to the database through the tunnel.

Worked this time. It was probably a cut&paste extra character of some sort as I was literally manually cutting my working password from Google Chrome's password repo and pasting it. When I selected the 'copy' option in Chrome instead it worked. Thanks for your help and support!

Hi i got this same error too even though my details were correct any help would be much appreciated thanks. It's when i use mysql workbench to try and connect to my database using standard TCP/IP over SSH

The instructions that we have work if you are using the correct details. However, there may be software on your machine or in your network that is preventing the connection. Some antivirus and firewall products prevent the types of connections that are necessary.

I'm facing the same problem, and I've double checked all the settings, but still getting a bunch of other errors like "End of File", "Generic Failure", "Local variable dirpath referenced before assignment"

Is this with MySQL workbench, or are you connecting to the database in some other way? If the latter, what code are you using?