Terminal: Importing into the DB from a SQL-file

Just for myself… Otherwise, I always have to search for it again:

$ mysql -u username -p databasename < filename.sql

As I use Zend Server, I pretty much always have something like this:

$ /usr/local/zend/mysql/bin/mysql -u username -p databasename < /Users/kasaev/Downloads/filename.sql

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>