Submit a Ticket
Support Center » Knowledgebase » Databases » Import/Export a MySQL Database using phpMyAdmin

Import/Export a MySQL Database using phpMyAdmin

IMPORTING A MYSQL DATABASE:


1. Log into cPanel.




2. Open phpMyAdmin by clicking the phpMyAdmin icon





3. Select the database in the left menu that you will be working with.




4. Click Import in the top menu.




5. Under File to Import, click Browse and select the backup file you previously created (it will be either a .sql .zip or .tar.gz file).




6. Click Go at the bottom right.



When the database has been imported successfully, you should see a message at the top of the page similar to: Import has been successfully finished, ## queries executed.


EXPORTING A MYSQL DATABASE:


1. Log into cPanel.




2. Open phpMyAdmin by clicking the phpMyAdmin icon.




3. Select the database in the left menu that you will be working with.




4. Click Export in the top menu.




5. Under the Export heading, ensure that all of your tables are selected and that the SQL option is selected.




6. Under the Options heading, ensure that you have selected, Add DROP TABLE / VIEW / PROCEDURE / FUNCTION.




7. Ensure the Save as file option (towards bottom of page) is checked. If you think you database is quite large, choose either zipped or gzipped to compress the file so it will be easier to download. If you choose none, you will be save the file without compression (which is OK, you don't have to compress the file).




8. Click Go.


9. You will be prompted to either open or save the file. Please select the option to save the file and then save the somewhere you'll remember (such as directly on your desktop).



TROUBLESHOOTING:


#1044 - Access is denied

If you get the following error when importing a a database through PhpMyAdmin, you will need to edit the sql file you're trying to import.

CREATE SCHEMA IF NOT EXISTS `DataBaseName` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;

MySQL said: Documentation
#1044 - Access denied for user 'userna5'@'localhost' to database 'DatabaseName'

PhpMyAdmin does not allow you to CREATE databases due to security reasons. In order to get your SQL file to load you will need to remove the CREATE SCHEMA line at the beginning of your code.


#50+ MB databases

If the database that you are trying to import is over 50 MB in size, then you will not be able to import the database through phpMyAdmin on shared servers. In this case please open a ticket to our technical support so they can assist you appropriately.

 This answer was helpful  This answer was not helpful
 Back