PhpMyAdmin – How to Fix SQL File Import Failures

phpmyadmin

I exported all tables from my database with the option "Export tables as separate files".

This worked perfectly, the tables were packed to a zip file:

enter image description here

However, If I try to import them, I get this:

enter image description here

and nothing is imported:

enter image description here

I also tried to remove botecsql10_database.sql, botecsql10_extra.sql and export it again. This is to make sure that only files with "table" in the name are imported.

But then I get this:

enter image description here

But only a single table was imported

enter image description here

How can I import the tables?

Best Answer

I gave up to try to import the single tables. I solved it by exporting the database as a compressed .zip file. I omitted very large log tables.

Then I uploaded the file to the server where MySQL runs and imported the compressed database dump via the following mysql command after extracting it:

mysql -u USERNAME -p target_database < dump.sql

Phpmyadmin is not a good candidate for importing databases, always import/export directly on the database server by using commands.

Related Topic