mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
Use mysql.user.authentication_string for password
Don't distinguish between a "password hash" and "authentication string" anymore. Now both are stored in mysql.user.authentication_string, both are handled identically internally. A "password hash" is just how some particular plugins interpret authentication string. Set mysql.user.plugin even if there is no password. The server will use mysql_native_password plugin in these cases, let's make it expicit. Remove LEX_USER::pwhash.
This commit is contained in:
@@ -482,36 +482,36 @@ SET TRANSACTION ISOLATION LEVEL SERIALIZABLE;
|
||||
CREATE USER 'user_test_rpl'@'localhost' IDENTIFIED BY PASSWORD '*1111111111111111111111111111111111111111';
|
||||
SELECT host, user, password, plugin, authentication_string, select_priv FROM mysql.user WHERE user LIKE 'user_test_rpl%';
|
||||
host user password plugin authentication_string select_priv
|
||||
localhost user_test_rpl *1111111111111111111111111111111111111111 N
|
||||
localhost user_test_rpl mysql_native_password *1111111111111111111111111111111111111111 N
|
||||
connection slave;
|
||||
USE test_rpl;
|
||||
SELECT host, user, password, plugin, authentication_string, select_priv FROM mysql.user WHERE user LIKE 'user_test_rpl%';
|
||||
host user password plugin authentication_string select_priv
|
||||
localhost user_test_rpl *1111111111111111111111111111111111111111 N
|
||||
localhost user_test_rpl mysql_native_password *1111111111111111111111111111111111111111 N
|
||||
connection master;
|
||||
|
||||
******************** GRANT ********************
|
||||
GRANT SELECT ON *.* TO 'user_test_rpl'@'localhost';
|
||||
SELECT host, user, password, plugin, authentication_string, select_priv FROM mysql.user WHERE user LIKE 'user_test_rpl%';
|
||||
host user password plugin authentication_string select_priv
|
||||
localhost user_test_rpl *1111111111111111111111111111111111111111 Y
|
||||
localhost user_test_rpl mysql_native_password *1111111111111111111111111111111111111111 Y
|
||||
connection slave;
|
||||
USE test_rpl;
|
||||
SELECT host, user, password, plugin, authentication_string, select_priv FROM mysql.user WHERE user LIKE 'user_test_rpl%';
|
||||
host user password plugin authentication_string select_priv
|
||||
localhost user_test_rpl *1111111111111111111111111111111111111111 Y
|
||||
localhost user_test_rpl mysql_native_password *1111111111111111111111111111111111111111 Y
|
||||
connection master;
|
||||
|
||||
******************** REVOKE ********************
|
||||
REVOKE SELECT ON *.* FROM 'user_test_rpl'@'localhost';
|
||||
SELECT host, user, password, plugin, authentication_string, select_priv FROM mysql.user WHERE user LIKE 'user_test_rpl%';
|
||||
host user password plugin authentication_string select_priv
|
||||
localhost user_test_rpl *1111111111111111111111111111111111111111 N
|
||||
localhost user_test_rpl mysql_native_password *1111111111111111111111111111111111111111 N
|
||||
connection slave;
|
||||
USE test_rpl;
|
||||
SELECT host, user, password, plugin, authentication_string, select_priv FROM mysql.user WHERE user LIKE 'user_test_rpl%';
|
||||
host user password plugin authentication_string select_priv
|
||||
localhost user_test_rpl *1111111111111111111111111111111111111111 N
|
||||
localhost user_test_rpl mysql_native_password *1111111111111111111111111111111111111111 N
|
||||
connection master;
|
||||
|
||||
******************** SET PASSWORD ********************
|
||||
|
Reference in New Issue
Block a user