0

I have created a user for the database with all the permission granted and I try yo use

mydb = mysql.connector.connect(
        host = "my_domain_ip",
        user = "the username from the website",
        passwd = "the password from the website",
        database = "the name of the database"
    )

I verified the information but I get the error: mysql.connector.errors.DatabaseError: 1130: Host '109.99.64.67' is not allowed to connect to this MySQL server What can I do ?

  • Ask whoever configured that MySQL server to allow connections from 109.99.64.67 ie your IP. – Błotosmętek Apr 26 '20 at 09:29
  • Try to connect with the [mysql shell](https://dev.mysql.com/doc/refman/8.0/en/mysql.html) first to find out if the Python code or library is the problem. – Michael Butscher Apr 26 '20 at 09:33
  • But is there a way to let people to connect only based on a password and a username – vladsuper5555 Apr 26 '20 at 09:34
  • @MichaelButscher the error is generated in python, so the problem should be at the database – vladsuper5555 Apr 26 '20 at 09:35
  • i found an easy solutiuon i just added to the remote MySQL '%' so that any IP with correct name and password could connect – vladsuper5555 Apr 26 '20 at 09:45
  • 1
    Does this answer your question? [Host 'xxx.xx.xxx.xxx' is not allowed to connect to this MySQL server](https://stackoverflow.com/questions/1559955/host-xxx-xx-xxx-xxx-is-not-allowed-to-connect-to-this-mysql-server) – Avishka Dambawinna Apr 26 '20 at 10:23

0 Answers0