MariaDB-10.4+ error on "UPDATE mysql.user SET Password=PASSWORD"
That is an old mysql command : "UPDATE mysql.user SET Password=PASSWORD" MariaDB-10.4+ the mysql.user is a view rather than a table.
So what is instruction to set a password for a user ?
Here is an example of the error on remote_server.log
mysql -A -h localhost -P 3306 -usellyoursaas -pxxxxxxx -e 'UPDATE mysql.user SET Password=PASSWORD('\''xxxxxx'\'') WHERE User='\''xxxxxxx'\'';'
ERROR 1356 (HY000) at line 1: View 'mysql.user' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
Yes, i think there is several instruction to set password to be sure to be compatible with all mysql and mariadb version. Error is ignored by the deployer.
Hi, I'm running mariadb v10.6 and modified the "action_deploy_undeploy.sh" line
Q3="UPDATE mysql.user SET Password=PASSWORD('$dbpassword') WHERE User='$dbusername'; "
by
Q3="SET PASSWORD FOR '$dbusername' = PASSWORD('$dbpassword'); "
Q3a="SET PASSWORD FOR '$dbusername'@'localhost' = PASSWORD('$dbpassword'); "
Q3b="SET PASSWORD FOR '$dbusername'@'%' = PASSWORD('$dbpassword'); "
and it works perfectly
Change has been merged into official sources.