How to Create a MySQL Database in cPanel

Creating a MySQL database in cPanel is essential for web applications that require data storage, such as WordPress, Joomla, or custom applications. This guide will walk you through the steps to create a MySQL database in cPanel.

Prerequisites

  • Access to your cPanel account.
  • A basic understanding of databases.

 

Step 1: Login to cPanel 

Step 2: Locate the MySQL Databases Section

  1. Once logged in, scroll down to the Databases section.
  2. Click on MySQL Databases.

Step 3: Create a New Database

  1. In the Create New Database section, enter a name for your database in the text field.
    • Note: Database names often begin with your cPanel username, followed by an underscore (e.g., username_dbname).
  2. Click Create Database.
  3. You should see a success message indicating that your database has been created.

Step 4: Create a Database User

  1. Scroll down to the MySQL Users section.
  2. In the Add New User field, enter a username.
  3. Choose a strong password and enter it in the Password and Password (Again) fields.
    • Alternatively, you can use the Password Generator to create a secure password.
  4. Click Create User.
  5. A success message will confirm that the user has been created.

Step 5: Add User to Database

  1. Scroll down to the Add User to Database section.
  2. Select the user you just created from the User dropdown menu.
  3. Select the database you created from the Database dropdown menu.
  4. Click Add.
  5. On the next screen, you’ll need to set the user privileges.
    • You can select All Privileges to give the user full access to the database or choose specific privileges as needed.
  6. Click Make Changes.

Step 6: Confirm Your Setup

  • After completing these steps, your MySQL database and user are now set up. You can view them in the Current Databases section, where you will see a list of all your databases and their associated users.

Step 7: Use Your Database

  • You can now use your MySQL database with your web applications by connecting using the database name, username, and password you just created.

 

Auttoiko artikkeli teitä? 0 käyttäjistä hyötyivät artikkelista (0 Äänet)