Attempting to update user permissions using the UPDATE command can result in the error:
ERROR 1356 (HY000): View 'mysql.user' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
In MariaDB 10.4 and higher, mysql.user is a view, not a table. As a result, performing direct updates on this view is no longer supported.
To address this error, use the following recommended practices:
To grant remote access to the root user in MariaDB 10.4 , use the following command:
ALTER USER 'root'@'%' IDENTIFIED BY 'new_password';
The above is the detailed content of How to Fix MySQL Error 1356: Invalid Table References in UPDATE Queries?. For more information, please follow other related articles on the PHP Chinese website!