skip to Main Content

I can’t see users in phpmyadmin on windows server 2012. It gives the error:

Not enough privilege to view users.

Warning in .librariesclassesDbiDbiMysqli.php#213 mysqli_query(): (HY000/1194): Table ‘user’ is marked as crashed and
should be repaired

How can I resolve this error?

2

Answers


  1. You have to repair your user table. Use a SQL query like ‘REPAIR TABLE user’ or repair it using phpmyadmin .

    Login or Signup to reply.
  2. The error, Not enough privilege to view users in phpmyadmin can also occur when importing an older MySQL database into a newer MariaDB instance via a SQL dump due to changes in how the users are stored.

    Other symptoms include:

    1. The command select * FROM mysql.user; returns the error message:

      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

    2. The command select * FROM mysql.tables_priv; returns an empty result set.

    The solution:

    As the database root user, run the following queries:

    use mysql;
    
    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','');
    

    Then restart the MariaDB server.

    Credit: IgorG on the Plesk forums. (https://talk.plesk.com/threads/view-mysql-user-references-invalid-table-s-or-column-s-or-function-s-or-definer-invoker-of-view-lack-rights-to-use-them.363334/)

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search