Use Python's mysqldb library to connect to the local MySQL database with the following error:
File "/usr/lib/python2.7/dist-packages/mysqldb/__init__.py", line Bayi, in Connect
Return Connection (*args, **kwargs)
File "/usr/lib/python2.7/dist-packages/mysqldb/connections.py", line 187, in __init__
Super (Connection, self). __init__ (*args, **KWARGS2)
_mysql_exceptions. Operationalerror: (1045, "Access denied for user ' root ' @ ' ***-vuldb.local ' (using Password:yes)")
Workaround:
Add ' root ' @ ' ***-vuldb.local ' access rights
The authorized root user has all of the TestDB databases permissions (all permissions for a database):
Mysql>grant all privileges in testdb.* to [e-mail protected]***-vuldb.localhost identified by ' 1234 ';
Mysql>flush privileges;//Refresh System Permissions Table
Format: Grant permissions on database. * To User name @ login host identified by "password";
Reference: http://www.cnblogs.com/fly1988happy/archive/2011/12/15/2288554.html