Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Hi Im attmepting to import a 100+MB sql file, I guess I need to do it by command line as phpmyadmin times out.

Any tips appreciated, thanks.

share|improve this question

It's usually better to do imports via the command line

# mysql -h host -u user -p database < dump.sql
share|improve this answer
+1 for beating me to the punch – Charles Hooper Oct 7 '09 at 14:02
  1. Upload the file to the server

  2. Create the database (you can still do this in phpMyAdmin) and assign privileges to a user, let's call this database "dbexample" and the user "dbuser"

  3. Import the SQL dump:

    mysql -u dbuser -p dbexample < your_file.sql

You will be prompted for the password when you enter this command.

share|improve this answer

I would add the "--compress" option if you choose not to upload the file to your server.

mysql --compress -h host -u user -p database < dump.sql
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.