kkk
kkk

Reputation: 115

Not enough privilege to view users in phpmyadmin

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

Not enough privilege to view users.

Warning in .\libraries\classes\Dbi\DbiMysqli.php#213 mysqli_query(): (HY000/1194): Table 'user' is marked as crashed and should be repaired

How can I resolve this error?

Upvotes: 1

Views: 14948

Answers (3)

Arjun Bhatt
Arjun Bhatt

Reputation: 71

Go to xampp\mysql\bin in Command Prompt and Try to execute following command,

mysqlcheck -u root -p --auto-repair --check --all-databases
(Password prompted - Press enter if blank)

Hope it will work for you. All the best.

http://www.gnhub.com

Upvotes: 0

Nick
Nick

Reputation: 11384

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/)

Upvotes: 3

Hirumina
Hirumina

Reputation: 748

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

Upvotes: 0

Related Questions