Move mysql databases from an HDD with a dead OS
I need to move all my databases from a hard-disk with dead OS to a new one.
I've moved all files from /var/lib/mysql to new location, everything is fine, except the mysql usernames. When I access Privileges tab in phpmyadmin I receiver this error:
(
SELECT DISTINCT `User` , `Host`
FROM `mysql`.`user`
)
UNION (
SELECT DISTINCT `User` , `Host`
FROM `mysql`.`db`
)
UNION (
SELECT DISTINCT `User` , `Host`
FROM `mysql`.`tables_priv`
)
UNION (
SELECT DISTINCT `User` , `Host`
FROM `mysql`.`columns_pr开发者_如何学Goiv`
)
UNION (
SELECT DISTINCT `User` , `Host`
FROM `mysql`.`procs_priv`
)
ORDER BY `User` ASC , `Host` ASC
MySQL said:
#1034 - Incorrect key file for table 'procs_priv'; try to repair it
How can I fix this?
This problem is usually caused by upgrading to a newer version of MySQL which has different privilege tables.
You can use the mysql_fix_privilege_tables command to fix it.
精彩评论