
There are three ways you can import a database file (or SQL) file directly into a MySQL database. However the choice will depend on the size of the database you are attempting to upload.
Over some of the recent major revisions in phpMyAdmin (which is used to manage the MySQL databases), the location of the import utility has changed. In the version currently installed with both Plesk 7.5.x Reloaded and Plesk 8.0.x is can be found in two places:
This may take some time. If the browser has stopped responding, then the upload may have failed - try the method below if this keeps happening.
If you have a large file (more than a few megabytes) then this method is not suitable. The next method will work better.
If you have a very large database (totaling 10's or 100's of megabytes), then uploading via HTTP is not suitable. Instead, it will be quicker and more efficient to import the file directly into the database using the mysql command-line utility on the server.
However, to do this you will need SSH access to the server. If you do not have SSH access, please see our article:
To import an SQL file:
mysql -u username -p database < filename
mysql -u forum -p forum < private/backup.sql
Enter password:
If you see the error "Access denied for user 'username'@'localhost'", check that you are using the correct username and password - this means that either one of them (or both of them) failed.
Depending on the size (and complexity) of the SQL file, this can take from a few seconds to a few minutes to complete. If you want to cancel command while it is running, press Ctrl & C at the same time.
Also, if you have a zipped or gzipped file, you will need to de-compress it before using it (the mysql command line utility will not understand the compressed file). To do this, run the following:
unzip path/to/file.zip
or
gunzip path/to/file.gz
If you are unsure about this method and would like a member of our Support Team to run it for you, please Submit a Ticket and we will do our best to assist you.