I'm trying to connect to a database on a Linux server, everything works fine with PHP using:
$mysqli= new mysqli($_DBHOST, $_DBUSER, $_DBPASS, $_DB);
I can also connect using the command line with:
mysql -u xxx -p
But when I try to connect with Python using pymysql I get the following error:
pymysql.err.InternalError: (1130, "Host 'xxx' is not allowed to connect to
this MariaDB server")
Python code:
import pymysql
conn = pymysql.connect(host="xxx",user='xxx', passwd='xxx', db = 'xxx',
,port=3306, autocommit=True)
How can this even be possible? It cannot be a permission issue since PHP can connect fine, or can it?