Magento – Database File Not Importing Completely

databaseimportexportMySQL

we are trying to move the magento site from one domain to another domain.

but the database filoe size is 800mb.

we are using cpanel.

when we are trying to import the database, its not uploading completely.

lot of tables are missing after importing.

is there any way to import 800mb database file completely

thanks in advance

Best Answer

Do you have shell access to the server? If so, you can likely upload the file to it (via FTP or rsync), and then use the MySQL CLI tools to import. Or, if you have remote access to the MySQL server enabled for your IP, you can import directly through your local CLI tool.

Here's an example of what I would do regularly:

MySQL CLI

mysql -u user -p your_magento_db -h server.com < database.sql

rsync/SSH/MySQL CLI

rsync -avPz ./database.sql user@server.com:/path/to/temp/location/
ssh user@server.com
[login]
mysql -u user -p your_magento_db < /path/to/temp/location/database.sql
[enter password]

The first example requires that you have remote access allowed to your MySQL server, and also the CLI tools installed locally on your machine.

The second example is used when you need to push the database up to the remote server, then you log into it and use the CLI tool there to make the import.


Note that the above command syntax might change depending on your environment, but this is generally the best way to avoid large transfer limits over HTTP.

Related Topic