Proudly Hosting over 100,000 Fast Websites since 2010

How can we help you?

Type your topic or keywords and hit enter to search our knowledgebase.

How to Create a Database in cPanel

1. Log in to your cPanel account.

2. In the Databases section, click on MySQL Databases.

3. In the New Database field, enter a name for the new database you wish to create.

4. Click on Create Database.

Here’s a detailed answer to how to create a database in cPanel: 

Creating a database in cPanel involves several steps, but it’s a relatively straightforward process. Here’s a detailed explanation of how to do it:

  1. Login to cPanel: To begin, you need to log in to your cPanel account. You can do this by accessing your hosting provider’s website and entering your credentials.
  2. Navigate to the MySQL Databases section: Once logged in, look for the MySQL Databases icon or section within cPanel. This is where you’ll manage your databases.
  3. Create a new database: In the MySQL Databases section, you’ll see an option to create a new database. Click on it. You’ll be prompted to enter a name for your new database. Choose a name that’s relevant to your website or application. Remember that the name should be unique within your hosting account.
  4. Create a database user: After creating the database, you’ll need to create a user who can access and manage it. Scroll down the MySQL Databases section until you find the “MySQL Users” option. Click on it, and then you’ll have the option to add a new user. Enter a username and a strong password for this user. Make sure to keep this information secure as it grants access to your database.
  5. Assign privileges to the user: Once the user is created, you need to assign privileges to it. Return to the MySQL Databases section and find the “Add User to Database” option. Select the user you created and the database you want to grant them access to from the dropdown menus. Then, click on the “Add” button. You’ll be taken to a page where you can specify the privileges for that user on the selected database. Typically, you’ll want to grant them all privileges, unless you have specific reasons not to.
  6. Confirm and finalize: After assigning privileges, your database setup is complete. You can confirm the creation of the database and the user by checking the list of databases and users within the MySQL Databases section. You should see the newly created database and user listed there.
  7. Update your application: If you’re setting up the database for a website or web application, you’ll need to update your application’s configuration files to use the newly created database credentials. This typically involves specifying the database name, username, password, and host (usually ‘localhost’) within your application’s settings.

That’s it! You’ve successfully created a database in cPanel and are ready to start using it for your website or application. Remember to keep your database credentials secure and regularly backup your database to prevent data loss.

Updated on April 27, 2024