skip to Main Content

I have a 70mb table dump that I need to added back into a database. I have tried phpMyAdmin but even with increasing the time_out and other settings in php.ini and config.inc.php it keeps timing out.

max_execution_time 900
max_input_time 900
max_input_vars 1000
memory_limit 1280M
post_max_size 750M
upload_max_filesize 750M

Is there a way to command line IMPORT a dump file into a Table? Setting the first row of the dump (import) to be the header? Is this even possible being that a table needs to have TYPES set for the structure?

2

Answers


  1. You can split the import file in several chunks and execute them one by one, with a commit after each chunk.

    This will lower the risk of phpmyadmin timeout, while also reducing the impact on the database (uncommitted changes are gathered in the UNDO tablespace, whose size is limited).

    Login or Signup to reply.
  2. If you searching for a command line import utility, so , yes there is one, which you can use like:

    mysql -u username -p new_database < data-dump.sql
    
    • Create new DB, named for example new_database
    • if mysql not in your PATH, then find your mysql installation DIR and go inside
    • replace “username” with your username , and data-dump.sql with your dump file name
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search