How to Import a .sql Dump into a Database
Importing a .sql file into a database
- Go to the phpMyAdmin interface in the Plesk hosting panel.
- In the left menu, select the desired database (important: click the actual database name, not the server).
- In the top menu, open the Import tab.
- Click Browse and select your .sql file from your local computer.
- Make sure the file format is set to SQL and the encoding is usually utf8 (you can leave it as default).
- Click the Import button to start the import process.
What to Do if You Encounter Import Errors
1. Timeout or File Size Limit Error
Symptoms: The import does not complete and shows errors such as “Maximum execution time exceeded” or “upload_max_filesize exceeded”.
Solution:
- Split a large dump into smaller parts (manually or using tools like SQLDumpSplitter).
- Alternatively, import the database via SSH using: mysql -u username -p dbname < dump.sql
2. Character Encoding Error
Symptoms: Incorrect display of Cyrillic or special characters.
Solution:
- Make sure the .sql dump is saved in the correct encoding (e.g., UTF-8 without BOM).
- In the Character set of the file field during import, select utf8.
3. “Access Denied” Permission Error
Symptoms: A message indicating access is denied.
Solution:
- Check that the user has the necessary permissions for the selected database.
- Log in with the user assigned to that database (shown next to the database name in Plesk).
4. “Table already exists” Error
Symptoms: The database is partially loaded, and some tables are not added.
Solution:
- Make sure the dump includes DROP TABLE IF EXISTS commands.
- If not, manually delete the tables from the database or add DROP statements before CREATE.
Note: If the dump is very large or complex, it is better to upload it to the server via FTP and import it from the command line (SSH), since phpMyAdmin has limitations.
Order virtual hosting here.