I
I
Ivan Bragin2015-10-20 22:21:32
MySQL
Ivan Bragin, 2015-10-20 22:21:32

MariaDB. Resetting the password when exiting the console?

CentOS7 | MariaDB 5.5.44 | PHP 5.6.13 | Nginx 1.8.0 | Everything works in a virtual machine.
1. I go to the site, a warning pops up: Access denied for user 'testuser'@'localhost' (using password: YES).
2. I go to the console: mysql -u root -p.
3. I enter the command: set password for 'testuser'@'localhost' = PASSWORD('123456');
4. I update the site page - everything is ok!
5. I type in the console: exit;
6. I refresh the site page - warning: Access denied for user 'testuser'@'localhost' (using password: YES).
7. Return to point 2.
I can't understand anything. Nothing changes in the [mysql] user.password table.
Only root works normally. Basically I need help...
Upd1. The password does not actually change. That is, if you exit and enter the console, the password field will not change. But to authorize in mysql is obtained only after resetting the password.
Upd2. It has nothing to do with exiting the console. After the release, it may still work for a while. Then it dies again...
Upd3. Mysql users table, plugin column for some (buggy) users was "mysql_native_password". Deleted - it seems so far stable.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
Alexander Chernykh, 2015-10-20
@sashkets

https://dev.mysql.com/doc/refman/5.5/en/adding-use...

R
Ruslan Fedoseev, 2015-10-20
@martin74ua

means somewhere else a request to change the password is being made.
Check the cron scripts of your site.

K
krypt3r, 2015-10-21
@krypt3r

Some kind of mystic. Ivan Bragin try to manually set the password UPDATE mysql.user SET password = 'hash', then do FLUSH PRIVILEGES. Does SHOW WARNINGS show anything? Is there anything in the logs?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question