Loading...

Knowledgebase

How can I create a MySQL database and user in cPanel? Print

  • 0

To create a MySQL database and user in cPanel, follow these steps:

Create a MySQL Database:


1. Log in to your cPanel account.
2. Navigate to the "Databases" section.
3. Click on "MySQL Databases".
4. Enter a name for your database in the "New Database" field.
5. Click "Create Database".

Create a MySQL User.

1. In the same "MySQL Databases" page, scroll down to the "MySQL Users" section.
2. Enter a username and password for the new user.
3. Click "Create User".

Add User to Database:

1. In the "MySQL Databases" page, find the "Add User to Database" section.
2. Select the user you just created from the dropdown menu.
3. Select the database you created from the dropdown menu.
4. Click "Add".

Assign Privileges (optional):

1. If you want to assign specific privileges to the user, click on the "Edit Privileges"
button.
2. Select the desired privileges (e.g., SELECT, INSERT, UPDATE, DELETE).
3. Click "Make Changes".

That's it! You have now created a MySQL database and user in cPanel. You can use these credentials to connect to your database using a MySQL client or in your web application.


Was this answer helpful?
Back