How do I create a MySQL database and user in cPanel/WHM? How do I connect them?

To create a MySQL database and user, log into the cPanel interface for the desired domain and click on MySQL Databases under the Databases section.  At the next page, enter the new database name under the Create New Database field to create a new database. You can create a new user by specifying one under Add New User. 

To make sure that the MySQL users have access to specific MySQL databases, you can link them at the bottom of the page under Add User to Database.  The next screen will allow you to grant privileges for the MySQL user to the database you selected.

To connect to a database and administer it, you can use phpMyAdmin. You can access this by clicking the icon of the same name in the Databases section of cPanel.  

Was this answer helpful?

 Print this Article

Also Read

How to host the primary domain from a subfolder (.htaccess)?

Summary The public_html directory for all of its Web site files. Addon domains use sub...

How can I limit access to certain directories on my server by requiring a password using cPanel/WHM?

In cPanel, it is very simple to limit access to a directory on your server. This can be used to...

How do I backup my entire site in cPanel?

Entire accounts can be backed up by doing the following: Go to 'backup', under the 'Site...

How Can I See My Total Disk Space and Bandwidth Available on My Reseller Account?

If you would like to check the number of files, disk space or how much bandwidth you are using on...

How can I limit the number of emails a domain can send out per hour?

Click on the "Tweak Settings" link under "Server Setup". Within the "Mail" section is a text box...