kneeki
kneeki

Reputation: 2692

Importing large databases into MySQL

I'm trying to import a database using Ubuntu Terminal (~260MB) into MySQL and I believe it's timing out and only importing half of the data and dropping me to prompt because of it's size. I've tried:

  1. php.ini
    • max_execution_time = 600
    • post_max_size=512M
    • upload_max_filesize=512M
    • memory_limit=512M
  2. config.inc.php
    • $cfg['ExecTimeLimit'] = 0;
  3. my.cnf
    • max_allowed_packet=512M

Command used: mysql -u root database_name < dump.sql

edit: As others have mentioned, PHP configs were striked because they aren't relevant as I'm using the terminal.

Upvotes: 0

Views: 87

Answers (1)

Asaph
Asaph

Reputation: 162781

PHP is completely uninvolved in the command you're running so those php configs you listed in your question would have no impact. You can try making tweaks in your my.cnf (often found in the /etc directory). I suggest adding this:

max_allowed_packet=64M

Don't forget to restart mysql for changes in my.cnf to take effect.

Upvotes: 3

Related Questions