Little Nugget of Wisdom #234: mysql data import via the command line

Joeri Poesen //

If you're used working with phpmyadmin, you might find yourself a bit lost when you're working in an environment without php-support like, say, when you're setting up an nginx-based rails stack.

To import an export script (or any other slq script obviously), here's what you do:

<br></br> mysql -usymbi -psekrit -Dmy_app < data_export.sql<br></br>

params:
-u: username
-p: password
-D: database name

Sweet, no?