Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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
add comment

3 Answers

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
add comment
  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
add comment

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
add comment

Your Answer

 
discard

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