A simple process to get large database copied using phpMyAdmin and without shell access.
Every resource on Google for Copy Database in phpMyAdmin says – Export the database in phpMyAdmin. Create a new database and import the exported file into the newly created database using phpMyAdmin interface. The problem with import using phpMyAdmin is when you have a very large file and don’t have access to command prompt or shell to run import command. In my case the database size was more than 500 MB which cannot be uploaded into phpMyAdmin.
How to Copy Database in phpMyAdmin?
Let me share a simple process to get database copied using phpMyAdmin and without shell access.
- The first thing is to export the database from phpMyAdmin. When exporting make sure you don’t have the Create Database line at the very top of the export file. If you have that line, you need edit the file to delete that line.
- The next step is to create a new database where you would like the old database to be copied over.
- Download the BigDump MySQL Importer. For your reference I have attached it here as well.
- Extracting the content of the zip file, you will see one php file named bigdump.php.
- Edit the file to add the details of your new database created in step 2.
$db_server = 'localhost'; $db_name = ''; $db_username = ''; $db_password = '';
- Once you have the details upload your sql file and the bigdump file to your server using FTP. You may not be allowed to upload 500 MB file into phpMyAdmin but you can always upload them using FTP.
- Once uploaded point your browser to the bigdump.php file. It should give you option to import the sql file into the database.
I hope this helps other fellow webmasters cloning large database when they have no access to shell. Enjoy.
Readers who read this article also read …