ERROR 1050 (42S01) at line : Table ‘user’ already exists

I set up a new VPS with WordOps using the guide. However, while inserting the mysql dump into the database, I encountered the error

ERROR 1050 (42S01) at line : Table 'user' already exists

To resolve the issue, I opened the .sql dump file with nano and inserted the following lines at the top.

 DROP TABLE IF EXISTS `mysql`.`global_priv`;
DROP VIEW IF EXISTS `mysql`.`user`;

This solved the problem and the data was imported successfully.

The solution is from stackexchange.

Leave a Reply

Your email address will not be published. Required fields are marked *