How to import large .sql files into MySQL via shell? | Softescu | Full Service Digital Agency for Drupal & Mobile in Romania

If you seek to import a large MySQL file via the shell in Linux, the following command might be helpful to you:

shell>mysql -uusername -ppassword db_name < dumpfile.sql

If you are already running mysql, you can execute an SQL script file using the source or \. command:

mysql> source dump.sql
mysql> \. dump.sql


This is relevant for …

MySQL, Linux, import


Hello from Russia! Can I quote a post in your blog with the link to you?

Post a comment


We do not want to offend your intelligence so please pass this simple test to prevent automated spam submissions and Galactic Empire soldiers.