C:> mysql -hlocalhost -uroot -proot
mysql> SHOW VARIABLES LIKE ‘wait_timeout’;
If this is very low (e.g. 30 seconds) then increase it (e.g. 5 minutes):
mysql> SET SESSION wait_timeout = 300;
mysql> SET SESSION interactive_timeout = 300;
Then execute your SQL file (issue a USE `db` if necessary):
mysql> use TUTORIALS;
mysql> . database.sql
(Visited 83 times, 1 visits today)