mirror of
https://github.com/serghey-rodin/vesta.git
synced 2025-08-20 13:24:24 -07:00
made the mysql query compatible with v5.7
Updated the query according to https://dev.mysql.com/doc/refman/5.6/en/resetting-permissions.html and https://dev.mysql.com/doc/refman/5.7/en/set-password.html to make it compatible with both mysql v5.6 and v5.7
This commit is contained in:
parent
956bc6697c
commit
c1e1521b42
1 changed files with 3 additions and 3 deletions
|
@ -42,9 +42,9 @@ subj="v-change-database-host-password $*"
|
|||
|
||||
case $type in
|
||||
mysql) mysql_connect $host;
|
||||
query="USE mysql; UPDATE user SET"
|
||||
query="$query password=PASSWORD('$dbpass')"
|
||||
query="$query WHERE User='$dbuser';"
|
||||
query="SET PASSWORD FOR"
|
||||
query="$query '$dbuser'@'localhost'"
|
||||
query="$query = PASSWORD('$dbpass');"
|
||||
query="$query FLUSH PRIVILEGES;"
|
||||
mysql_query "$query" ;
|
||||
if [ "$dbuser" == "root" ]; then
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue