Tutorials6 min read

How to Create and Manage MySQL Databases in cPanel

S

SNBD Host Team

July 13, 2026

Almost every dynamic website — WordPress, WooCommerce, Joomla, custom PHP apps — needs a MySQL database to store content, user data, settings, and more. If you've installed WordPress using a one-click installer, the database was created automatically. But if you're setting up manually, or if you need an additional database for a project, you need to create one yourself.

This guide walks through creating a MySQL database in cPanel, creating a database user, assigning permissions, and using phpMyAdmin to manage data. This works on all SNBD HOST cPanel hosting plans.

What Is a MySQL Database and Why Do You Need One?

A database is an organized collection of data stored in tables — like a very powerful spreadsheet. When someone visits your WordPress website and reads a blog post, WordPress queries the MySQL database to retrieve that post's title, content, author, and date. When someone submits a contact form, the data goes into the database.

Without a database, websites can only show static HTML pages. Any site that has user logins, products, blog posts, or any kind of dynamic content needs a database.

Step 1: Open MySQL Databases in cPanel

Log into cPanel (go to yourdomain.com/cpanel or through the SNBD HOST client area). Scroll down to the Databases section. You'll see two relevant options:

  • MySQL Databases — create and manage databases and users
  • MySQL Database Wizard — a guided step-by-step process (easier for beginners)

Let's use the MySQL Database Wizard first since it's more beginner-friendly. Click it.

Step 2: Create the Database (Using the Wizard)

The wizard has four steps. On Step 1, you'll see a field labeled "New Database." Type a name for your database. Choose something descriptive:

  • For a WordPress site: wordpress or myblog
  • For a shop: shop or woocommerce
  • For a custom project: projectname

Note: cPanel automatically adds your cPanel username as a prefix to your database name. If your cPanel username is snbduser and you type wordpress, the actual database name becomes snbduser_wordpress. This is important — you'll need the full prefixed name when configuring your website.

Click Next Step.

Step 3: Create a Database User

On Step 2, you create a user that will have access to this database. Fill in:

  • Username: Something that describes the purpose, like wpuser or shopuser. Again, your cPanel username prefix is added automatically.
  • Password: Click Generate Password for a strong random password, or type your own. This needs to be a strong password — it protects your database. Copy it to a safe place immediately, because cPanel will not show it again.
  • Password (again): Confirm the password

Click Create User.

Step 4: Grant Permissions

On Step 3, you assign the user to the database and set what they can do. You'll see a list of permission checkboxes (SELECT, INSERT, UPDATE, DELETE, etc.).

For most websites, especially WordPress, check ALL PRIVILEGES — this grants the user full control over the database. Then click Next Step.

On Step 4, you'll see a success summary. Your database is created, your user is created, and the user has been granted access to the database. Write down all three pieces of information:

  • Database name (including the prefix, e.g., snbduser_wordpress)
  • Database username (e.g., snbduser_wpuser)
  • Database password

Step 5: Use the Database in Your Website

When installing a website script (WordPress, Joomla, etc.), you'll be asked for database credentials during setup. Enter:

  • Database Name: The full prefixed name (e.g., snbduser_wordpress)
  • Database Username: The full prefixed username (e.g., snbduser_wpuser)
  • Database Password: The password you just created
  • Database Host: Usually localhost on cPanel shared hosting

For WordPress specifically, these values go into the wp-config.php file. When using WordPress's installation wizard, it asks for them in a form.

Using phpMyAdmin to Manage Your Database

phpMyAdmin is a web-based interface for browsing and managing your MySQL databases. It lets you view tables, run SQL queries, import/export data, and more — all in your browser.

To open phpMyAdmin:

  1. In cPanel, go to the Databases section
  2. Click phpMyAdmin
  3. phpMyAdmin opens in a new tab showing all your databases in the left sidebar
  4. Click your database name to expand it and see its tables

Common tasks in phpMyAdmin:

Browsing a table:

Click the table name in the left sidebar. Then click Browse at the top to see all rows of data. This is useful for checking WordPress posts, users, or WooCommerce orders.

Running SQL queries:

Click your database name, then click SQL at the top. Type your query and click Go. For example:

SELECT * FROM wp_users;

This shows all users in your WordPress installation.

Resetting a WordPress admin password:

  1. Open phpMyAdmin and select your WordPress database
  2. Click the wp_users table and then Browse
  3. Find your admin user and click the Edit (pencil) icon
  4. Find the user_pass field. In the "Function" dropdown, select MD5
  5. In the value field, type your new password
  6. Click Go to save

Importing a database:

  1. Select your database in the left sidebar
  2. Click Import at the top
  3. Click Choose File and select your .sql or .sql.gz file
  4. Scroll down and click Go

Exporting a database:

  1. Select your database
  2. Click Export
  3. Choose "Quick" export method and SQL format
  4. Click Go — your browser will download the .sql file

Managing Databases from the MySQL Databases Page

Go back to the regular MySQL Databases page (not the wizard) to see a list of all your databases and users. From here you can:

  • Create additional databases: Scroll down to "Create New Database"
  • Delete a database: Click the Delete link next to a database (be careful — this is permanent)
  • Add a user to a database: Scroll down to "Add User to Database" and use the dropdowns
  • Change user privileges: Click the user's name under a database
  • Change a user's password: In the Current Users section, click Change Password

How Many Databases Can You Have?

On SNBD HOST BDIX shared hosting, the number of databases depends on your plan. Most plans allow 5 to unlimited databases. Each WordPress installation requires one database, so if you're running multiple WordPress sites on one hosting account, you'll need a separate database for each.

Keep your database names organized and meaningful. When you have snbduser_blog, snbduser_shop, and snbduser_staging, it's easy to know which database belongs to which site. Random names like snbduser_db1 become confusing quickly when you have multiple projects.

mysqldatabasecpanelwordpress databasephpmyadminbangladesh hostingweb development
S

Written by

SNBD Host Team

The SNBD Host team shares hosting guides, automation tips, and business growth strategies for Bangladeshi entrepreneurs.

Share Article