MySQL tables_priv corrupted

Posted on

Question :

I have a mysql database and i need to create an user for the login.
This user need the privileges to only select on only one table where the login info are.
on phpmyadmin when i use the gui i receive this error:

‘#1194 – the table ‘tables_priv’ is signed as corrupted and need to be repaired.
If i use the cli with this command:
”’
GRANT SELECT ON dbname.tblname to ‘dbuser’
”’
i receve the seme error.

the database exist. the table exist. the user exit. i have root access.

Answer :

“Repair” the table:

Plan A (assuming you can connect as root): CHECK TABLE mysql.tables_priv; That will probably tell that it needs repairing. Then do REPAIR TABLE mysql.tables_priv;

Plan B: See how to do the equivalent with myisamchk from the shell prompt.

Leave a Reply

Your email address will not be published.