To create a MySQL database in cPanel, follow these steps:
-
Log in to your cPanel account.
-
In the "Databases" section, click on the "MySQL Databases" icon.
-
Under the "Create New Database" heading, enter a name for your new database in the "New Database" field.
-
Click on the "Create Database" button.
-
The database will now be created and you will see a notification with the database's name and username.
-
To create a new user for the database, scroll down to the "MySQL Users" section and enter a username and password in the "Add New User" fields.
-
Click on the "Create User" button.
-
To grant privileges to the user, scroll down to the "Add User to Database" section, select the user and the database, and click on the "Add" button.
-
In the "User privileges" section, select the privileges that you want to grant to the user and click on the "Make Changes" button.
-
To access the database, you will need a MySQL client. Some popular MySQL clients include MySQL Workbench (GUI) and mysql (command line).
-
Open your MySQL client and connect to the database using the username and password that you created.
-
You can now use the MySQL client to manage and query the database.
That's it! You should now have a MySQL database in cPanel that you can use to store and manage data.