Black Friday Hosting Deals: 69% Off + Free Migration: Grab the Deal Grab It Now!
cPanel has been one of the most preferred control panel solutions; it gives users a user-friendly interface through which they would manage aspects of their hosting account. It includes databases, a very integral part of this management: create a database username. This tutorial will guide you in the process to create a database username in the cPanel to secure the required access in order to manage your databases.
Before executing the following steps, it's crucial to understand what a database username is and why it's so important. In general, a database username in cPanel refers to a unique identifier, paired with the password for their access to one or more databases. Such a factor is one of the critical ones toward security because it controls which users view, modify, or manage certain databases.
You need the following before starting:
- Access to your cPanel account
- The necessary permissions to create database users
- A clear idea of the privileges you want to assign to the new user
Open your login to the cPanel account using your login details. If you're unsure of your login URL, you should refer to your hosting provider.
Once you log in, move down to the "Databases" section. This is the section where all your tools to administer your databases sit, including creating new users.
On the Databases section, find the icon with "MySQL Databases" and click on it to take you to the MySQL database administration page.
Scroll down to the "Add New User" section on the MySQL Databases page. This is where you will create your new database username.
In the "Username" field, put in the desired new name for your new database user. Keep in mind that most hosts preface usernames with your account name so that your final username could look something like "accountname_username."
Navigate to the section to add a new user. Type in a strong password for the new user. Be sure to use a mix of both lowercase and uppercase letters, numbers, as well as special characters for maximum strength. The cPanel password strength meter will let you know the strength of the password you have chosen.
Alternatively you can use the "Password Generator" to generate a strong and random password automatically.
Fill in the username and password, then click the "Create User" button. cPanel will process your request and add the new database user.
Following the addition of the user, you'll need to add privileges. Keep scrolling down until you get to the "Add User To Database" section.
Select the new user to whom you want to grant access using the "User" drop-down and then select the database to which you want to grant access using the "Database" drop-down.
Click "Add" to take you to the privileges page.
On the privileges page, you will be allowed to choose about what the user should be allowed to do on the selected database. To this end, you are allowed the following options:
ALL PRIVILEGES: Gives all privileges that will allow you into the database
SELECT: grants the right of permission to read data
INSERT: To insert new data
UPDATE: To alter a pre-existing record
DELETE: Delete already existing record
CREATE: Create a new table or database
ALTER: Change the structure of a table
INDEX: Create an index, or drop an index
DROP: Delete a table, or a whole database
Select relevant privileges according to user need and your security needs. You can select "ALL PRIVILEGES" for full access or you can select specific privileges for granular access.
Once you decide which privileges you wish to apply, click on the "Make Changes" button for them to be applied
Use unique usernames: Avoid usernames such as "admin" or "user." Use distinct names for different purposes or to identify users of different teams.
Use strong password: Ensure your password is complex to deny intruders access to your database
Review and update privileges from time to time: From time to time, the privileges accorded to the users should be reviewed, and unnecessary privileges removed to avoid weaknesses.
Record database users: You record created users, purposes, and assigned privileges for easier management
Use another user for different applications: If you have several applications in your application system, create a different user for them so they may troubleshoot any security issue.
Username already exists: This error could be due to the username already existing. Try a different username or if you already have a user using the same name.
Privileges not taking effect: Ensure that you have clicked the "Save Changes" button after uploading your privileges. If the issue persists, try to delete the user and then add him again to the database.
Cannot create more users: You check your hosting plan limits. Some do not allow you to add so many users on the database.
Creating a database user in cPanel is creating a database user who can be used in order to control access securely to your databases. This is achieved by running this guide; it will give you the steps on how to create a user, appropriate privileges, and how to keep track of database access. Never forget best practices in creating a username and password creation to secure the valuable data.
Once you get acquainted with how cPanel operates, you would manage a large number of databases and users much more effectively, which will in turn further facilitate the working of your websites and applications.
Let’s talk about the future, and make it happen!
By continuing to use and navigate this website, you are agreeing to the use of cookies.
Find out more