From 44583b2d3c268cf5abf69b29f17600808cb3e523 Mon Sep 17 00:00:00 2001 From: Christoph Date: Wed, 24 Jun 2020 12:47:29 +0200 Subject: [PATCH] Add 'README.root-user' file. --- README.root-user | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 README.root-user diff --git a/README.root-user b/README.root-user new file mode 100644 index 0000000..c5b4dff --- /dev/null +++ b/README.root-user @@ -0,0 +1,15 @@ +# The root@localhost user account created by mysql_install_db is created with the +# ability to use two authentication plugins. +# +# First, it is configured to try to use the unix_socket authentication plugin. This +# allows the root@localhost user to login without a password via the local Unix +# socket file defined by the socket system variable, as long as the login is +# attempted from a process owned by the operating system root user account. +# +# CREATE USER root@localhost IDENTIFIED VIA unix_socket OR mysql_native_password USING 'invalid' +# CREATE USER mysql@localhost IDENTIFIED VIA unix_socket OR mysql_native_password USING 'invalid' +# + +# We can do: +# +ALTER USER root@localhost IDENTIFIED VIA unix_socket OR mysql_native_password USING PASSWORD('$MYSQL_ROOT_PW'