remotemysql.com cannot connect with python neither on the site manually

134 Views Asked by At

I try to reach to my remotemysql database with my Python script which worked fine first, now it doesn't connect anymore so I went to remotemysql.com/login.php but it gives an error

Connection failed: SQLSTATE[HY000] [2002] No such file or directory

anyone know if its only for me or if remotemysql.com is having problems? my code for Python should also be fine. these are random credentials in my code btw.

try:
    conn = mysql.connector.connect(
      host='remotemysql.com',
      database='thydfc2',
      user='thydfc2',
      password=os.environ.get('databasepass'))

  except Error as e:
    print(e)
  if conn.is_connected():
      mycursor = conn.cursor()```
0

There are 0 best solutions below