MySQL: Read a file from a session

Alternatively, to read a file of SQL statements from within a mysql session, use a source filename command (or \. filename, which is the same).

mysql> source insert.sql

mysql>\. insert.sql

The 2 mysql statements inside the file insert.sql are:

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

session

Series Navigation<< MySQL: Reading SQL statements from file
MySQL: Using mysqldump to backup database >>