summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2019-10-30 15:24:00 +0100
committerSergei Golubchik <serg@mariadb.org>2019-10-30 15:24:00 +0100
commit65358278859f3fd7704434b55fa2d414c570e8f6 (patch)
treedde9baefcc2847e2e740568d61d545abeb916e93 /scripts
parentf4ba775914d9d997d3a0116a05d09f1a34c28707 (diff)
downloadmariadb-git-65358278859f3fd7704434b55fa2d414c570e8f6.tar.gz
MDEV-19516 mysql_secure_installation doesn't set password_last_changed while setting password for root
Diffstat (limited to 'scripts')
-rw-r--r--scripts/mysql_secure_installation.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/mysql_secure_installation.sh b/scripts/mysql_secure_installation.sh
index 15a81cc1e8a..b2a9edf4953 100644
--- a/scripts/mysql_secure_installation.sh
+++ b/scripts/mysql_secure_installation.sh
@@ -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.."