View Full Version : How do I create a MySQL database in Cpanel?

How to create a MySQL database in Cpanel:

1. Login to your control panel and click on the 'MySQL Databases' icon.

2. Enter a name for your database in the 'Db' input field -> Click the 'Add Db' button.

3. Go back to the MySQL area by clicking the go back link or the back button in your browser.

4. Scroll down to where it says 'Users' and create a username and password for your database -> click the 'Add User' button.

5. Go back to the MySQL area and in the drop down menus make sure the user you added and the database you added are selected and click the 'Add User to Db' button.

Also, one thing to be aware of on Cpanel is that your username is added as a prefix to databases and database users. So if you set up a database named "phpdb" it's actually going to be yourusername_phpdb. So you would need to enter yourcpanelusername_phpdb as the database name in your scripts. You'll need to do the same thing for the db users. You'll notice this if you look at the drop down menu in the MySQL area in your control panel after you've created a database or database user.