How to create Database in CPanel
3 step guide in setting up your custom database with user/passThis is a short tutorial on how to create a database and assign a user to it under Cpanel.
First you’ll need to login to Cpanel using the information in the welcome email.
Click on MySQL databases.
Create a new database, using a name that is suitable (like joomla or db)
Click on Create Database. Once you’re done click Go Back.
Next you’ll need to create a new user. Use this form to create it. Pick a name for the user and assign a password to it. You can also use the password generator but make sure you copy that password, as you’ll need it later.
Click Create User and once it’s done click Go Back.
Next – you’ll have to assign that user to the database. From the first dropdown select the user you just created and from the second the database. Don’t worry about the prefixes in front of the database and username – this is how they are supposed to look. Click Add.
On the next screen select “All Privileges” and click “Make Changes”.
That’s it – you’ve done it. To connect to the database from a script use the following settings:
Hostname : localhost
Username : the username you created with the prefix like cpanelusername_username
Password : the username password that you’ve entered
Database : the database that you’ve created like cpanelusername_databasename
Please note that in the above examples we’ve used cpanelusername and it might confuse you, so let’s say your Cpanel Username is maiahost, the database you created is joomla, and the username you created is admin. To connect to the database use the following settings :
Hostname : localhost
Username : maiahost_admin
Password : somepassword
Database : maiahost_joomla