How to create and attach a database user in cPanel
Generally, when you want to create a database in the cPanel, using the MySQL Database wizard is the fastest and easiest way. This creates both the database and a user for that database. However, you may need to either add a database user to a database or wish to create a single user you want to add to multiple databases. In that case, you will need to create the users manually. This article will guide you through the two step process to create a database user and then assign it to your desired databases.
Creating the database user
- Log into your cPanel dashboard.
- Locate the Databases icon from your main cPanel page and click on the MySQL Databases icon.
- Once inside the database area, scroll down until you see the MySQL Users Add New User section. From here, you will see the form to create your new user. Note that the database name will always be prefixed with your cpanel username. Add the second portion to create the new database username. For example, our new user will be named inmoti6_imhtest.
- Type in the password you desire for both the Password and Password (Again) fields.
- Click the Create User button to complete the database user creation.
Assign the user to one or more databases
- Locate the Add User to database section. You will see two dropdowns here. Select your desired user from the top dropdown and the database you wish to add it to from the lower dropdown.
- Click the Add button to save the changes.
- You are brought to a screen that allows you to select privileges. Generally speaking you will want to click the checkbox for ALL PRIVILEGES. Selecting individual privileges is a customization for advanced users.
- Click the Make Changes button at the bottom to save the user and privileges to the database. You will be able to see the new user in the user list for each database they are assigned to in the database list.
- Repeat steps 1-4 for any additional databases you want to allow the user to have access to.
Support Center Login
Social Media Login
2015-10-28 9:44 am
bt its showing table query error..
Error creating the table query wasCreate Table (id_user INT NOT NULL AUTO_INCREMENT ,name VARCHAR( 128 ) NOT NULL ,email VARCHAR( 64 ) NOT NULL ,phone_number VARCHAR( 16 ) NOT NULL ,username VARCHAR( 16 ) NOT NULL ,password VARCHAR( 32 ) NOT NULL ,confirmcode VARCHAR(32) ,PRIMARY KEY ( id_user ))mysqlerror:You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '(id_user INT NOT NULL AUTO_INCREMENT ,name VARCHAR( 128 ) NOT NULL ,email VARCHA' at line 1
2015-10-28 10:28 am
Sorry for the SQL syntax error that you're seeing. Per the error message, you have a syntax error in your query that may involve either missing punctuation or the incorrect use of certain commands. We do not provide coding support as it is beyond the scope of our support, but you may need to speak with a programmer in order to identify the exact problem. It's possible that a part of the code located within this section " (id_user INT NOT NULL AUTO_INCREMENT ,name VARCHAR( 128 ) NOT NULL ,email VARCHAR( 64 " is using deprecated commands.
Apologies again that we can't provide a direct answer for the issue. If you have any further questions or comments, please let us know.
2016-06-18 4:19 am
WARNING: You currently use the maximum number of MySQL databases. If you need additional databases, contact your service provider.
2016-06-20 11:53 am
This means you are at the maximum databases allowed for your account. If you need more, you will need to contact your service provider and upgrade your account. Or you can delete any databases you no longer need.