-1

I got a task with a database that is about ~700mb. I generated an .sql file with table structures and data and am trying to import it to localhost via PHPMyAdmin Import tab. It has been over 2.5 hours and the import yet to finish, I went to the location of the database through explorer and it's size is just 180mb and is growing but painfully slow. How may I increase the speed of the insert?

Shadow
  • 33,525
  • 10
  • 51
  • 64
  • You can disable auto_commit, the next thing you can disable constraints, the rest is waiting, why do you don't do it when you are sleeping – nbk Oct 10 '20 at 13:58
  • Thanks for the answer I will explore that. I am not doing this while I am sleeping, because I am working now and want to solve this, cause it may cause issues later on. Cheers! – Marius Slovikas Oct 10 '20 at 14:29

1 Answers1

2

Its me again, if anyone will ever come across this issue, use cmd for importing a huge database instead of phpmyadmin

Pseudocode:

mysql bin directory>mysql -u [DATABASE USER] -p [DATABASE NAME] < [PATH TO SQL FILE] 

eg.:

C:\xampp\mysql\bin>mysql -u root -p mydatabse < C:\Users\User\Downloads\file.sql