Synergy Codeworks

Tips, Tricks, and articles related to open source technology
Tags >> MySQL
Jan 05
2010

Running a Script or Importing Data Using the Command Line mysql Tool

Posted by John Hobart in MySQL

Sometimes all you want to do is run a big script or import a database using the MySQL command line tool without echoing out tons of output.  Luckily it's dead easy.  If the script you want to run is called script.sql just ssh into your machine and type:

mysql -uUSERNAME -pPASSWORD DB_SCHEMA < script.sql

Substituting your username and password and the database you want to run the script against.

 

 

Client Login