How to execute thousand of sql commands using mysql cli

1> Open windows cmd

2> Type:

.mysql.exe --user=root --password -e "source C:pathtomysqlfile.sql"

3> Hit Enter

SQL file example:

USE `databasename`;
 
INSERT INTO blah blah;
INSERT INTO blah blah;
INSERT INTO blah blah;
%d bloggers like this: