Create a copy of a large Database to use in a test forum ?

webbouk

Well-known member
I'm trying to import a copy of our forum database onto the server to use with a test forum prior to upgrading to 2.3, however the exported database SQL file is 3.6GB in size, or if compressed with gzip it is just under 800mb - both fail to import due to server restraints.
I've tried using the 'Copy database' withon phpMyAdmin and eventually time out.
I've increased the max file size and max upload size to accomodate the zipped file but still run into connection errors.

Using 'BigDump MySql Importer' I can do a partial upload but then hit the following error:
MySQL: Incorrect string value: '\xF0\x9F\x98\xB4 on some tables which stops the import.

Has anyone any ideas how to get around this so that I can import the database

WHM with cPanel, phpMyAdmin, php8.2. MySql 8.0.
 
I'm trying to import a copy of our forum database onto the server to use with a test forum prior to upgrading to 2.3, however the exported database SQL file is 3.6GB in size, or if compressed with gzip it is just under 800mb - both fail to import due to server restraints.
I've tried using the 'Copy database' withon phpMyAdmin and eventually time out.
I've increased the max file size and max upload size to accomodate the zipped file but still run into connection errors.

Using 'BigDump MySql Importer' I can do a partial upload but then hit the following error:
MySQL: Incorrect string value: '\xF0\x9F\x98\xB4 on some tables which stops the import.

Has anyone any ideas how to get around this so that I can import the database

WHM with cPanel, phpMyAdmin, php8.2. MySql 8.0.
 
Somehow the upload has worked.
I initially raised the max file size and max upload size to accommodate the zipped file via Tweaking PHP within WHM, which resulted in connection errors. However, increasing the same within the cPanel account allowed the import within phpMyAdmin
 
Somehow the upload has worked.
I initially raised the max file size and max upload size to accommodate the zipped file via Tweaking PHP within WHM, which resulted in connection errors. However, increasing the same within the cPanel account allowed the import within phpMyAdmin
Hopefully you used the utf8 string on dump.
 
To begin, please log in via SSH or access the terminal on WHM to navigate to your website directory. Once there, execute the following command:

Code:
mysqldump -u myusername -p mydatabase > mydatabase_backup.sql

*change dbuser and db name according to your existing database

After a few moments, the file named mydatabase_backup.sql will be created, the duration of which may vary based on the database size.

Next, please move or copy this file to the directory of your new test domain. After navigating to that directory, run the following command:

Code:
mysql -u newDBuser -p newDBname < mydatabase_backup.sql

*change the dbuser and db name according to yours newly created database for test site.

Hope this helps.
 
Last edited:
Back
Top Bottom