Importing and exporting databases is essential for migrating websites, restoring data, and creating backups. This guide covers importing and exporting MySQL databases using phpMyAdmin in Plesk.

### Importing a Database via phpMyAdmin

1. Log in to **Plesk**.
2. Go to **Databases**.
3. Click the database you want to import data into.
4. Click **Webadmin** (phpMyAdmin).
5. Click the **Import** tab.
6. Click **Choose File** and select your `.sql` or `.sql.gz` backup file.
7. Under **Format**, ensure **SQL** is selected.
8. Click **Go** to start the import.
9. Wait for the import to complete. A success message will appear.

### Exporting a Database via phpMyAdmin

1. In Plesk, go to **Databases**.
2. Click the database you want to export.
3. Click **Webadmin** (phpMyAdmin).
4. Click the **Export** tab.
5. Select **Quick** for a standard export, or **Custom** for more options (selecting specific tables, adding compression).
6. Under **Format**, select **SQL**.
7. Click **Go**. The database backup will be downloaded to your computer.

### Importing a Database Using the Plesk Dump Tool

1. In Plesk, go to **Databases**.
2. Click the database name.
3. Click **Import Dump**.
4. Upload a `.sql` dump file from your computer.
5. Click **OK** to import.

### Important Notes

- Importing a database will **overwrite** existing tables with the same names.
- phpMyAdmin has an upload limit (typically 50 MB or higher). For larger databases, contact your hosting provider about importing via SSH.
- Always export a backup before importing new data.
- When migrating a database, ensure the character set matches (use **utf8mb4** for modern applications).

### Troubleshooting

**"File too large" error during import:**

- Compress the SQL file to `.sql.gz` before importing.
- Split the file into smaller chunks.
- Contact your hosting provider to increase the upload limit.

**"SQL query error" during import:**

- The SQL file may contain syntax errors or may be from a different MySQL version.
- Check the error message in phpMyAdmin for details.