Hexazn – Tips & Tricks | Hexazn Blog

How to create a mysql database on cPanel

Step 1: Open Manage My Databases

  1. Log in to your cPanel account.
  2. Use the search bar at the top-right corner.
  3. Type Manage My Databases.
  4. Click Manage My Databases from the search results.

Step 2: Create a New Database

  1. Find the Create New Database section.
  2. Enter your preferred database name in the New Database field.

For example:

demo_db

  1. Click Create Database.
  2. Your new database will be created successfully.

Note: cPanel automatically adds your account username before the database name.
For example: hexazn_demo_db

Step 3: Create a Database User

  1. Scroll down to the Database Users section.
  2. Under Add New User, enter a username.

For example:

demo

  1. Enter a strong password in the Password field.
  2. Enter the same password again in the Password (Again) field.
  3. You can also use Password Generator to create a strong password automatically.
  4. Click Create User.

Your new database user will now be created.

Note: cPanel may automatically add your account username before the database username.
For example: hexazn_demo

Step 4: Select the Database User

  1. Scroll down to the Add User To Database section.
  2. Open the User dropdown menu.
  3. Select the database user you created in the previous step.

For example:

hexazn_demo

Step 5: Add the User to the Database

  1. From the Database dropdown, select the database you created earlier.

For example:

hexazn_demo_db

  1. Make sure the correct User and Database are selected.
  2. Click Add.

The database user will now be connected to your database.

Step 6: Give the User All Privileges

After clicking Add, you will see the Manage User Privileges page.

  1. Check the ALL PRIVILEGES option.
  2. This will automatically select all required database permissions.
  3. Scroll down and click Make Changes.

Your database user will now have permission to access and manage the database.

Done!

You have successfully:

  • Created a MySQL database
  • Created a database user
  • Connected the user to the database
  • Given the user all required privileges

Your database is now ready to use with WordPress, PHP applications, or other website software.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top