cPanel makes a lot of things easier, but one of its greatest time savers is creating a MySQL database and user. In this tutorial, I will show you how to set up a new MySQL database and user in cPanel using the MySQL Database Wizard.
Log in to cPanel.
In the “Databases” section, click the “MySQL Database Wizard” link or icon.
Create the MySQL Database
In the “Step 1: Create A Database” section, enter the database name in the “New Database” field. A prefix will be pre-populated (in this example it is ggexample_). The format may vary depending on your host, but the prefix is required. The database name includes the prefix and the underscore.
Click the “Next Step” button.
Create the MySQL Database User
In the “Step 2: Create Database Users” field, enter the database user name in the “Username” field. Like the database name, this must also include a prefix. The database user name includes the prefix and the underscore.
Enter a password or passphrase. Note that the system will analyze your password or passphrase and reject it with a “password strength” error if it is too short or not sufficiently complex.
Click the “Create User” button.
Add the User to the MySQL Database and Grant User Permissions
You can select individual permissions for the new database user, but for most common applications you will want to give the user all permissions. To do that, check the “ALL PRIVILEGES” box.
Scroll down and click the “Next Step” button.
After the permissions are set, you will see a success message. The success page also includes handy links to “Add another database,” and “Add another user for your MySQL database.”
Everything you need to connect an application to the database is now in place.
Managing MySQL Databases and Users
To manage your databases and users, go back to the cPanel “Databases” section and click the “MySQL Databases” link or icon.
Scroll down to the “Current Databases” section.
In the “Privileged Users” column, click the username to change permissions, or the trash can icon to revoke all privileges for the user.
In the “Actions” column, click the “Rename” link or icon to rename the database or the “Delete” link or icon to delete the database.
That’s it.
I told you cPanel made it easy to set up a new MySQL database and user, but you probably weren’t expecting it to be that easy.
What other methods do you use to create databases and users? Do you think using cPanel for the job would save you some time?