summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2019-01-20 00:59:11 +0100
committerSergei Golubchik <serg@mariadb.org>2019-02-04 15:54:10 +0100
commit9c9b4590b68d0b655f26191f93d7ed4e6497ce06 (patch)
tree2d360a2a1afdeb55cd01ef1fa83f3ad8715d8206 /scripts
parentb8344be4fac0b8e7297a556e89f62dd6a6bafa47 (diff)
downloadmariadb-git-9c9b4590b68d0b655f26191f93d7ed4e6497ce06.tar.gz
Fix the bug introduced in MDEV-17658
if auth_root_socket is set, root user should be using unix_socket Followup for 4abb8216a05
Diffstat (limited to 'scripts')
-rw-r--r--scripts/mysql_system_tables_data.sql2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/mysql_system_tables_data.sql b/scripts/mysql_system_tables_data.sql
index f14dcf01594..60867fc2bc3 100644
--- a/scripts/mysql_system_tables_data.sql
+++ b/scripts/mysql_system_tables_data.sql
@@ -37,7 +37,7 @@ REPLACE INTO tmp_user_nopasswd SELECT @current_hostname,'root',@all_privileges F
REPLACE INTO tmp_user_nopasswd VALUES ('127.0.0.1','root',@all_privileges);
REPLACE INTO tmp_user_nopasswd VALUES ('::1','root',@all_privileges);
-- More secure root account using unix socket auth.
-INSERT INTO tmp_user_socket VALUES ('localhost',IFNULL(@auth_root_socket, 'root'),@all_privileges);
+INSERT INTO tmp_user_socket VALUES ('localhost',IFNULL(@auth_root_socket, 'root'),json_set(@all_privileges, '$.plugin', 'unix_socket'));
IF @auth_root_socket is not null THEN
IF not exists(select 1 from information_schema.plugins where plugin_name='unix_socket') THEN
INSTALL SONAME 'auth_socket'; END IF; END IF;