How do I debug this?
mydb = pymysql.connect(
host="<db-host-ip>",
port=3306,
user="<username>",
password="<password>",
database="<dbname>"
)
fails with :
pymysql.err.OperationalError: (1045, "Access denied for user '<myuser>'@'<long_and_boring_hostname>' (using password: YES)")
while this:
mysql --host=<db-host-ip> --user=<username> --password=<password> <dbname>
connects just fine.
I can also connect to the db from java and MySql workbench
I've tried using mysql.connector , same error
I can connect to another db from Python just fine
Why does Python error has long hostname after my username ? can it be suppressed?
** Some more details **
MySql is remote , poython and other tools are local
I am connecting just fine to other databases, only this one seems to conflict.
My main question is how can I troubleshoot this, I need to know more than "Access denied"