Search code examples
phpmysqlphpmyadminimporterror

PhpMyAdmin Import Error-MySQL server has gone away/Unrecognized Keyword


So I've exported a MySQL database from PHPMyAdmin (which I access from within IIS Express on a Windows 8 machine) and I'm trying to import this database onto another machine, however on that machine I receive the following errors: Error

Warning1

Warning2

Please help. I need to be able to restore this database and I have no idea how to fix this.


Solution

  • Server has gone away often means that there is a MySQL connection timeout. This can happen if you have an especially large database dump (and it sounds like you might). You could try fiddling with your MySQL settings in mf.cnf but realistically you are far better off using the command line for a file that large:

    mysql -u user -p password db_name < dumpfile.sql