mysql_db/user: Use password for my.cnf

According to the MySQL docs[0] the password should be stored after
'password=' instead of 'pass='.

[0] http://dev.mysql.com/doc/refman/5.1/en/password-security-user.html
reviewable/pr18780/r1
Till Maas 12 years ago
parent d5a236c53d
commit 2e904ae233

@ -131,7 +131,7 @@ def load_mycnf():
return False
try:
config.readfp(open(mycnf))
creds = dict(user=config.get('client', 'user'),passwd=config.get('client', 'pass'))
creds = dict(user=config.get('client', 'user'),passwd=config.get('client', 'password'))
except (ConfigParser.NoOptionError, IOError):
return False
return creds

@ -230,7 +230,7 @@ def load_mycnf():
return False
try:
config.readfp(open(mycnf))
creds = dict(user=config.get('client', 'user'),password=config.get('client', 'pass'))
creds = dict(user=config.get('client', 'user'),password=config.get('client', 'password'))
except (ConfigParser.NoOptionError, IOError):
return False
return creds

Loading…
Cancel
Save