all, I'm trying to verify a given MySQL server's connectivity through Python, provided with host, username, password, and schema. I tried to use subprocess module, Ex.
subprocess.check_call(['mysql', '-u', 'root'])
but it will bring up mysql in the terminal, which is not what I want. I also tried mysqldb, but it does not support Python 3+.
Is there a way to test out a MySQL server's parameters through Python? At least I want to know if it connects. It would be better if I could know more detail about the failure of connection.
Thanks!