To upload and import a MySQL dump (SQL file) into CentOS Web Panel (CWP), you can use the web interface for smaller files or the command line for larger databases.
Using phpMyAdmin (Best for files < 50MB)
This is the most common method for standard database sizes.
- Log in to your CWP User Panel.
- Navigate to SQL Services > phpMyAdmin.
- On the left sidebar, click the name of the target database you want to import into.
Note: If you haven't created the database yet, do so first via SQL Services > MySQL Manager. - Click the Import tab in the top menu.
- Click Choose File and select your .sql or .sql.gz dump from your computer.
- Click Go (at the bottom) to start the upload and import process.
Using the CWP Restore Tool
CWP has a built-in tool for restoring backups that can handle database dumps directly.
- Go to File Management > Backup > Restore a backup copy.
- Upload your MySQL database backup file.
- CWP will process the file and restore the tables to the associated database.
1. Create a database in your CPanel.
2. Go into my phpadmin and select the database you just created.
3. Click the SQL tab.
4. See "Or Location of the textfile - Click browse to find the mysqldump file on your computer then click go.