How to Create and Manage MySQL Databases in cPanel
If your website relies on WordPress, Joomla, or any dynamic application, it needs a MySQL database to store data. Fortunately, cPanel makes it simple to create and manage databases—even if you’re not a developer.
In this article, you’ll learn how to create, manage, and connect MySQL databases in cPanel.
1️⃣ Log in to Your cPanel Account
You can log into your Sternhost cPanel
Once logged in, scroll down to the Databases section.
2️⃣ Create a New MySQL Database
-
Click MySQL® Databases under the Databases section.
-
In the Create New Database field, type your preferred database name (e.g.,
mywebsite_db
). -
Click Create Database.
✅ You’ve now successfully created a new MySQL database.
3️⃣ Add a New MySQL User
Next, create a user that can access and manage the database.
-
Under MySQL Users, type a username and strong password.
-
Click Create User.
-
Then scroll to Add User to Database and select both the user and database you just created.
-
Click Add and choose ALL PRIVILEGES to give the user full access.
4️⃣ Manage Databases Using phpMyAdmin
You can edit or view your database content easily via phpMyAdmin:
-
In cPanel, click phpMyAdmin.
-
Select your database from the left sidebar.
-
You can now run SQL queries, import/export tables, or view records directly.
💡 Pro Tip: Always back up your database before making major edits. Sternhost offers free and automated CodeGuard backups for database security.
5️⃣ Connect Your Application to the Database
To link your app or CMS (like WordPress) to the database, you’ll need:
-
Database Name
-
Username
-
Password
-
Database Host: usually
localhost
Enter these credentials during setup or inside your app’s configuration file.
6️⃣ Managing Existing Databases
To rename, repair, or delete a database:
-
Go to MySQL® Databases in cPanel.
-
Under Current Databases, choose the action you need (Repair/Delete).
-
Use Check Database to scan for errors or Repair Database to fix them.
Managing databases in cPanel doesn’t have to be difficult. With Sternhost, you get a smooth experience and powerful tools to build, manage, and secure your databases.
If you’re looking for reliable hosting with cPanel access, check out:
👉 https://sternhost.com/