diff options
author | vva@eagle.mysql.r18.ru <> | 2003-10-25 16:23:24 -0400 |
---|---|---|
committer | vva@eagle.mysql.r18.ru <> | 2003-10-25 16:23:24 -0400 |
commit | 30cad8ec2f6e2cd0cc28f6cc5afc53b5da3e53df (patch) | |
tree | ee197ba716c5932c882604466444615f02ec334a /scripts | |
parent | 37ee1b8e439044a13bbd4f6c87909a4cfd278bbe (diff) | |
parent | dcc36e671c3a458b77dba4ffc409b4dc8b24d9ef (diff) | |
download | mariadb-git-30cad8ec2f6e2cd0cc28f6cc5afc53b5da3e53df.tar.gz |
Merge eagle.mysql.r18.ru:/home/vva/work/mysql.orig/clear/mysql-4.0
into eagle.mysql.r18.ru:/home/vva/work/BUG_1228/mysql-4.0
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/mysql_secure_installation.sh | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/scripts/mysql_secure_installation.sh b/scripts/mysql_secure_installation.sh index d6392c57731..1c7ca34ad59 100644 --- a/scripts/mysql_secure_installation.sh +++ b/scripts/mysql_secure_installation.sh @@ -85,9 +85,13 @@ set_root_password() { return 1 fi - do_query "SET PASSWORD FOR root=PASSWORD('$password1');" + do_query "UPDATE mysql.user SET Password=PASSWORD('$password1') WHERE User='root';" if [ $? -eq 0 ]; then echo "Password updated successfully!" + echo "Reloading privilege tables.." + if ! reload_privilege_tables; then + exit 1 + fi echo rootpass=$password1 make_config @@ -144,11 +148,11 @@ reload_privilege_tables() { do_query "FLUSH PRIVILEGES;" if [ $? -eq 0 ]; then echo " ... Success!" + return 0 else echo " ... Failed!" + return 1 fi - - return 0 } interrupt() { |