Project

General

Profile

password updated on mysql databases not taking effect

Added by Anchi Cheng about 15 years ago

This is a question from Carlos A. Lopez which I rephrase here.

When he updated the usr_object password in mysql using either set password or update password command, he found (as well as I did in my test):
1. the password was not used in the immediate attempt to connect to the database.
2. leginon does not start up properly with a sinedon error:
sinedon.dbdatakeeper.DatabaseError: Access denied for user 'usr_object'@'localhost' (using password: NO)

Here are what need to be done.
1. mysql does not update the user password on a running mysql server immediately since the cache is not updated. To make your change taking effect, do this in mysql command line while connected to your mysql database where you updated the password as mysql root user:

mysql>flush privileges;

2. if password is set, it should also be set in sinedon.cfg that you use in the form like this:
[global]
host: localhost
user: usr_object
passwd: your_password

Anchi