February 2018
Intermediate to advanced
510 pages
16h 10m
English
The mysql client is generally used interactively but it will also allow you to execute SQL statements from a file. In order to do so, create a text_file, which contains several statements that need to be executed, as follows:
shell> mysql db_name < text_file
Instead if USE db_name is kept as the first statement of the text_file then you can skip specifying the db_name from the command line:
shell> mysql < text_file
If already using the mysql connection, then use the source or \. command:
mysql> source file_name
By using the --verbose option, each statement gets displayed just before the result produced by it.
Read now
Unlock full access