[MXS-1510] Unable to login after SET password Created: 2017-11-02 Updated: 2018-01-02 Resolved: 2018-01-02 |
|
| Status: | Closed |
| Project: | MariaDB MaxScale |
| Component/s: | N/A |
| Affects Version/s: | 2.1.9 |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Major |
| Reporter: | Andrius Kulbis | Assignee: | Unassigned |
| Resolution: | Not a Bug | Votes: | 0 |
| Labels: | galera | ||
| Description |
|
I am using MaxScale v2.19 to load balance queries to 3-node gallera cluster. I decided to run phpMyAdmin connected to MaxScale for database administration. The problem occurs when I try to change database user password via phpMyAdmin or via CLI connected to MaxScale using SET password for 'user'@'%' = PASSWORD('****');| I get confirmation about successfully changed password, but then I am unable to connect to my database using new nor old password. Connecting to the each node directly works as expected with new password. I see that the password hash has changed in every node of cluster. Only thing that fixes this going to one of the cluster nodes directly and running same SET password for 'user'@'%' = PASSWORD('****') query, then I am able to connect to the database via MaxScale again. General log of each node on SET password operation:
My config:
I get the following error in MaxScale.log (due to a fact that I can login directly to db03-test): |
| Comments |
| Comment by markus makela [ 2017-12-27 ] | |||||||||||||||
|
Assuming that there are two grants, one for the client IP and another for the MaxScale IP, only the grant that matches the IP address of MaxScale will be changed. This is best explained with some example SQL. First, execute this on the backend server.
Then connect via MaxScale with the created credentials and execute the following.
After that, execute the following query directly on the backend server.
The result set should be close to the following one.
As we can see, the server does correctly change the password for the connected user but only for the user that is connected to the server, not to MaxScale. A way to work around this is to modify the password with a different user. This can also be done through MaxScale with a compound statement (MariaDB 10.1+ only) that modifies both of the users in one query:
| |||||||||||||||
| Comment by markus makela [ 2018-01-02 ] | |||||||||||||||
|
Not a bug. |