|
|
|
@ -291,9 +291,9 @@ def main():
|
|
|
|
|
|
|
|
|
|
try:
|
|
|
|
|
if module.params["login_unix_socket"]:
|
|
|
|
|
db_connection = MySQLdb.connect(host=module.params["login_host"], unix_socket=module.params["login_unix_socket"], user=login_user, passwd=login_password, db="mysql")
|
|
|
|
|
db_connection = MySQLdb.connect(host=module.params["login_host"], unix_socket=module.params["login_unix_socket"], user=login_user, passwd=login_password)
|
|
|
|
|
else:
|
|
|
|
|
db_connection = MySQLdb.connect(host=module.params["login_host"], user=login_user, passwd=login_password, db="mysql")
|
|
|
|
|
db_connection = MySQLdb.connect(host=module.params["login_host"], user=login_user, passwd=login_password)
|
|
|
|
|
except Exception, e:
|
|
|
|
|
module.fail_json(msg="unable to connect to database, check login_user and login_password are correct or ~/.my.cnf has the credentials")
|
|
|
|
|
try:
|
|
|
|
|