MySQL: Reading SQL statements from file

This entry is part 6 of 26 in the series Learn MySQL

If we have a script file such as insert.sql with the statement:

insert into artist (artiste, album, price) values ('Madonna','Immaculate',8.00)

We can execute this script file insert.sql on the command line.

>mysql allartist < insert.sql

The allartist is the database.


Series Navigation<< MySQL: Specifying connection parameters
MySQL: Read a file from a session >>