Forums

Can't connect to MySQL server on 'XYZ:3306' (-3 Temporary failure in name resolution)

Hi, i just got a problem while i was doing the "A beginners guide to building a simple database-backed Flask website on PythonAnywhere" tutorial. I'm running into an issue when creating tables. When I run db.create_all() it returns a couple hundred lines of errors. Most notably there is a big red "InterfaceError: (mysql.connector.errors.InterfaceError) 2003: Can't connect to MySQL server on 'XYZ:3306' (-3 Temporary failure in name resolution)

Can i get some help please?

What is XYZ?

Oh thats just some fake name. the real one looks like this. InterfaceError: (mysql.connector.errors.InterfaceError) 2003: Can't connect to MySQL server on 'nation:3306'

"nation" is not a valid database name on PythonAnywhere. Use the database name that is shown on the Databases page.