B-219 Sec-55 Noida, India
+918010221733

Import large .sql file into MySQL

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)

Leave a reply

You must be logged in to post a comment.