MySQL from apache command line

Was working on some large tables, over 50mb each, that needed importing to mysql and found the best way to do this was from the command line

cd /home/{web directory}/tmp
where I had saved the .sql file to for importing

mysql
use {database name};
showtables;
{database name} < {filename.sql};

At one stage I also ran the command direct

mysql {database name} < {filename.sql};
This entry was posted in Uncategorized and tagged , , . Bookmark the permalink.

Leave a Reply