mirror of
https://github.com/MariaDB/server.git
synced 2025-07-20 10:24:14 +03:00
Change the default authentication for root@localhost to IDENTIFIED VIA mysql_native_password USING 'invalid' OR unix_socket which provides secure passwordless login, while still allowing SET PASSWORD to work as expected. Also create a second all-privilege account for the user that owns datadir (and thus has full access to the data anyway). Compile unix_socket plugin statically into the server.
14 lines
615 B
Plaintext
14 lines
615 B
Plaintext
update mysql.global_priv set priv=json_insert(priv, '$.plugin', 'unix_socket');
|
|
flush privileges;
|
|
connect(localhost,USER,,test,MASTER_PORT,MASTER_SOCKET);
|
|
ERROR HY000: Plugin 'unix_socket' is not loaded
|
|
ERROR HY000: Plugin 'unix_socket' is not loaded
|
|
install plugin unix_socket soname 'auth_socket.so';
|
|
flush privileges;
|
|
connect(localhost,USER,,test,MASTER_PORT,MASTER_SOCKET);
|
|
ERROR 28000: Access denied for user 'USER'@'localhost'
|
|
ERROR 28000: Access denied for user 'USER'@'localhost'
|
|
update mysql.global_priv set priv=json_compact(json_remove(priv, '$.plugin'));
|
|
flush privileges;
|
|
uninstall plugin unix_socket;
|