getting-started-python icon indicating copy to clipboard operation
getting-started-python copied to clipboard

Can't connect to MySQL server

Open beshaya opened this issue 10 years ago • 22 comments

I set this up on my local machine with CloudSQL and it works great, but when I pushed to AppEngine with gcloud app deploy and go to the resulting webpage, I get:

(pymysql.err.OperationalError) (2003, "Can't connect to MySQL server on 'localhost' ([Errno 111] Connection refused)")

Any idea what's up?

beshaya avatar Sep 30 '16 05:09 beshaya

Good to know, @andrewsg. I finally managed to install MySQLdb locally after fighting for a few days with virtualenv. Issue was related to the DistutilsOptionError discussed further in this Stack Overflow post

kiptoomm avatar Jun 11 '18 06:06 kiptoomm

I have the same issue, following the steps here. The app runs fine locally, but gives the same error as mentioned when deployed. Are there any solutions?

onavsaber avatar Jul 18 '20 13:07 onavsaber