How to import large databases in MySQL?

While moving your web application to new host , you may get errors while importing large database into new hosting sever via PHPMyAdmin tool due to upload limitations in PHP. Normally we can only import 2MB file via PHPMyAdmin. However we can change this behavior with minimal configuration changes to your PHP installation.

How do i change configuring settings of PHP installation
: Find “php.ini” file in a folder of your http server. For example in my case , i am using XAMPP so it’s at : “C:\xampp\php\php.ini”.

Now open php.ini file, then edit upload_max_filesize and post_max_size property values to 10M.

Note: The PHP documentation states that the memory_limit setting also affects file uploading and memory_limit should be larger than post_max_size.

Using command Line

Command line will always be the most efficient and easy however not so friendly. If you have access to terminal open it and use the blow command.

For example if you want to access MySQL in xampp ,go to xampp\mysql\bin via command line

if the database name is present in the dump

That’s it.

I hope you like this Post, Please feel free to comment below, your suggestion and problems if you face - we are here to solve your problems.