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

I have used Linux to import a large mysql dump file (into a new database), but am new to how the process works in a local LAMP environment using xampp, as xampp does not support SSH. I've dowloaded the large_dump_file.sql from the Linux server to my local system. I'm using Windows XP and have used xampp to setup LAMP. I am able to access the local_database via phpMyAdmin, but the dump file is too large to import using that app. I'm trying to import the file via the command prompt, but so far with no success.

At the prompt:
cd ..
cd ..
cd xampp
cd mysql
cd bin

I've found that mysqlimport is used to import .csv and .txt files, and mysql is used to import .sql files, but can't find documentation as to whether or not to use the -u -p options so I've tried many variations of the command with no luck. What would be the proper command?

I've modified the hosts, virtual-hosts conf, and apache config files. Do I need to change any other config files on my local system?

Thanks.

share|improve this question

closed as off-topic by Tom O'Connor Aug 14 '13 at 21:26

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions must be relevant to professional system administration. Server Fault is a site dedicated to professionals; novice questions are off-topic. Please see the Help Center for more information on topicality. The best advice we can give you is to hire a professional to help you out." – Tom O'Connor
If this question can be reworded to fit the rules in the help center, please edit the question.

1 Answer 1

mysqldump is to dump database, that can be importing using the command line utility mysql

At your promt write:

mysql -h localhost -p -u <mysql-user> <database-name> < large_dump_file.sql

where is the user that has access to your db. If you don't have a db, create it before!

share|improve this answer
2  
If it is a large db dump, make sure your max_allowed_packet size is big enough to accommodate the largest field sizes you might have. –  lilott8 Mar 4 '11 at 15:37

Not the answer you're looking for? Browse other questions tagged or ask your own question.