• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • We are looking for U.S.-based freelancer or agency working with SEO or WordPress for a quick 30-min interviews to gather feedback on XOVI, a successful German SEO tool we’re looking to launch in the U.S.
    If you qualify and participate, you’ll receive a $30 Amazon gift card as a thank-you. Please apply here. Thanks for helping shape a better SEO product for agencies!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Resolved View 'mysql.user' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them

samson

New Pleskian
Plesk Obsidian
Version 18.0.40

Plesk was unable to update mariadb from 10.3 to 10.4, so I manually upgraded. The mariadb upgrade deleted some of plesks extensions.
Reinstalled plesk sucessfully, however, since mariadb 10.4, they have changed the table mysql.user to mysql.global_priv and now user is only a view.
Plesk will not install any apps with the following 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


Tried adding root@localhost as a user and added global privileges
done plesk repair all
 
Looks like database is corrupted. Try the following workaround:

1. Insert missing privileges:

Code:
INSERT INTO `tables_priv` (`Host`, `Db`, `User`, `Table_name`, `Grantor`, `Timestamp`, `Table_priv`, `Column_priv`) VALUES ('localhost','mysql','mariadb.sys','global_priv','root@localhost','0000-00-00 00:00:00','Select,Delete','');

2. Restart MariaDB to apply security changes:

# servier mariadb restart

3. Verify that select works now:

# plesk db

use mysql;

select * from user;
 
here's the error after applying insert query

ERROR 1292 (22007): Incorrect datetime value: '0000-00-00 00:00:00' for column `mysql`.`tables_priv`.`Timestamp` at row 1
 
It think you might have a strict mode setting in /etc/my.cnf that shouldn't be there. Try to edit /etc/my.cnf and replace whatever the "sql_mode" entry is with an empty value like
Code:
sql_mode= ''
then restart MariaDB.
# service mariadb restart

Further, after upgrading MariaDB did you run
# MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysql_upgrade -uadmin
to upgrade the MySQL scheme? If not, run it. There is no problem to run it again (if you might have done so earlier), it won't cause any damage.

For Plesk also make sure to run
# plesk sbin packagemng -sdf
to tell Plesk that you have a new version of something.

And finally, if the database itself starts up without problems, run
# plesk repair db -y
because after some upgrades of the database, Plesk needs to update some "datetime" settings, because between older and newer MariaDB versions some aspects of that has changed.
 
I am getting following
Dump all databases
Trying to Dump databases... mysqldump: Got error: 1356: "View 'sys.host_summary' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them" when using LOCK TABLES
mysqldump: Got error: 1356: "View 'sys.host_summary' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them" when using LOCK TABLES

the difference is i am getting View 'sys.host_summary instead of View 'mysql.user.
I checked all databses no error detected by check n repair tool, Also run above mentioned command, nothing works
 
Back
Top