Commit 65358278 authored by Sergei Golubchik's avatar Sergei Golubchik

MDEV-19516 mysql_secure_installation doesn't set password_last_changed while...

MDEV-19516 mysql_secure_installation doesn't set password_last_changed while setting password for root
parent f4ba7759
......@@ -440,7 +440,7 @@ if [ "$reply" = "n" ]; then
echo " ... skipping."
else
emptypass=0
do_query "UPDATE mysql.global_priv SET priv=json_set(priv, '$.plugin', 'mysql_native_password', '$.authentication_string', 'invalid', '$.auth_or', json_array(json_object(), json_object('plugin', 'unix_socket'))) WHERE User='root';"
do_query "UPDATE mysql.global_priv SET priv=json_set(priv, '$.password_last_changed', UNIX_TIMESTAMP(), '$.plugin', 'mysql_native_password', '$.authentication_string', 'invalid', '$.auth_or', json_array(json_object(), json_object('plugin', 'unix_socket'))) WHERE User='root';"
if [ $? -eq 0 ]; then
echo "Enabled successfully!"
echo "Reloading privilege tables.."
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment