Forums

Mysql just doesn't want a connect

Hi there, this part of code doesn't work, i mean without any errors, just stopped at this part and that all

connect = pymysql.connect(host = dataBaseIP, user = dataBaseUser, password = dataBasePassword, database = dataBaseTable)

If you're connecting to a database that is not available, that code may take a long time to time out and report that it could not connect.

Script works fine on my PC, but on the hosting pythonanywhere this part of code does not work

Free users have limited internet access. If you want to connect to some external server that may not work. See https://www.pythonanywhere.com/whitelist/