How do I create a MySQL database? Print

  • 146

Creating a database for your website is easy once you know where to click. Here’s how to set everything up from your cPanel:

Step 1: Create the Database

  1. Log in to your cPanel and click on theMySQL Databasesmenu in theDatabasessection.
  2. Enter your desired database name in the field provided and click on the Create Database option.

Your database is now ready. Next, you will create a user to manage it.

Step 2: Create a MySQL User

  1. Find the section calledMySQL Users and click on Add New User
  2. Enter a preferred username you wish to assign to your database.
  3. Create a strong password for the user.
    1. You may use the Password Generator (this is strongly recommended) to create a secure password
    2. Make sure to save the generated password securely.

  4. Click Create User.

Step 3: Assign the User to the Database

    1. Scroll to the Add User to Database section.
    2. Select the newly created user and the database.
    3. Click Add.

Step 4: Set User Privileges

      1. Once the user has been created, move to the "Add User to Database" section to assign the user to the database, and grant proper privileges.
      2. Choose the privileges you want to grant the user.
      3. Click Make Changes to save.

Once completed, you will see a confirmation message stating that the user’s privileges have been successfully saved.


Was this answer helpful?

« Back