Import large database in MySql

To import the large database in MySql, Below are the changes required in MySql my.ini (Configuration file):

Step 1: Stop the MySQL server from your control panel.

Step 2: Open the file C:\xampp\mysql\bin\my.ini

Search and Change the below lines (setting):

innodb_buffer_pool_size=4G
innodb_log_file_size=2GB
innodb_log_buffer_size=256M
innodb_flush_log_at_trx_commit=0
innodb_lock_wait_timeout=500
innodb_strict_mode=0

Step 3: Start the MySQL server from your control panel.

Step 4: Open the command prompt and run the import command

mysql -h localhost -u root -p < e:/mydb.sql

Note: In place of “e:/mydb.sql” put your database path.

So now you can import large database in MySQL.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.