Need Assistance?

In only two hours, with an average response time of 15 minutes, our expert will have your problem sorted out.

Server Trouble?

For a single, all-inclusive fee, we guarantee the continuous reliability, safety, and blazing speed of your servers.

How to Manage Databases in CloudPanel

Manage databases in CloudPanel

Manage databases in CloudPanel easily with its intuitive interface and powerful CLI tools. Whether you’re adding a new database, managing users, or performing exports and imports, CloudPanel simplifies these tasks. This guide will walk you through the essential steps for effective database management in CloudPanel.

1. Adding or Deleting a Database

To create a new Database in CloudPanel

  • Navigate to the Databases Section.
  • Click Add Database button.
  • Enter the required details of Database 
  • Database Name
  • Database User Name
  • Database User Password
  • Once all fields are filled, click the Add Database button to create new Database.

To delete a exiting Database in CloudPanel

  • Select the Database you want to delete.
  • Click the Delete button and confirm your action.

2. Managing Database Users

To Create a new Database User in Cloudpanel to access your database

  • Navigate to the Databases Section
  • Click on Add Database User.
  • Enter User Details such as
  • Database User Name
  • Database User Password
  • Select the Database
  • Assign Permissions
  • Once all information is provided, click on the Add Database User button to create the new user.

To delete a existing Database User

  • Select the user to delete.
  • Click Delete and Confirm your action to delete the user.

3. Managing Databases with phpMyAdmin

CloudPanel integrates with phpMyAdmin for web-based database management. To manage database, Click on “Manage” button to redirect to the  phpMyAdmin console on Cloudpanel.

4. Exporting a Database

CloudPanel uses the mysqldump utility for exporting databases.

Connect to your server via SSH using the Site User.

ssh user@ip_address

Navigate to the target directory where you want to save the database dump.

cd /target_directory

Use clpctl command to view available commands to manage database.

clpctl

Export the Database using command obtained from previous command.

For a compressed export (recommended)

clpctl db:export --databaseName=my-database --file=my-database-dump.sql.gz

For an uncompressed export

clpctl db:export --databaseName=my-database --file=my-database-dump.sql

5. Importing a Database

Connect to your server using SSH

ssh user@ip_address

Navigate to where the database dump is stored.

Use clpctl command to view available commands to import database.

cd /target_directory
clpctl

Import the Database using command:

clpctl db:import --databaseName=my-database --file=my-database-dump.sql.gz

Conclusion

Managing databases in CloudPanel is straightforward, offering both GUI and CLI options. You can easily add databases, manage users, and export or import data. For smooth exports and imports, it’s best to use CLI commands instead of phpMyAdmin

For expert guidance to Manage databases in CloudPanel, reach out to Skynats. Our team specializes in cloud database management, ensuring your systems run smoothly and efficiently. Contact us today for tailored support and solutions that meet your business needs.

Liked!! Share the post.

Get Support right now!

Start server management with our 24x7 monitoring and active support team

Can't get what you are looking for?

Available 24x7 for emergency support.