Directory

Terms of Use

Privacy

FAQ's

Contact

How to make a new mysql database

cPanel 11 and higher automates database creation to some degree but we will assume that you are using an older version or a different control panel. cPanel 11 also provides a video tutorial within the control panel but you may want to read the note taking part of this article. If you are not using cPanel 11 or higher you will need to create a database, a database user with password and add that user to the database. You should copy all that information to notepad as you are doing because you will need it later.

Your control panel login name is your server username. All databases and users created take the format controlPanelUsername_whatYouNameIt. We are going to shorten that to CPuser for these examples. The information needed to install your scripts is:
database host name "localhost" is normal on a cPanel server.
Database name "CPuser_dbName" is the common syntax
Database Username "CPuser_username"
Password "what-ever-you chose"

The reason it is done that way is because only one user could have a database named links on the entire server. This way every user can have their own database named links because each CPuser is different.

When you login to your control panel you will want to click on the database icon. Your particular icon may vary slightly depending on which theme is installed for your control panel.

Once you do that there will be a page with all your databases and users shown you want to find the create database section. In this screenshot we are creating a database named test. You just type in the name and press the button. After each of these steps you will view a confirmation screen. Simply click on the go back link.

Next you will need to create a user to use the database. It can be an existing user or you can add a new one. In this example we are adding the user tester with the password big989boy. Again simply click the button and go back at the confirmation page.

The next step is the most commonly missed one for a new user. You must add the new user to the database and set the privileges that user is allowed. In most cases you will select all. You use the dropdown box to select the correct user and the correct database. Note how the names we picked have been preceded with the account user name which in this case is colbytn.

When you view the last confirmation screen is your best opportunity to copy everything you need to notepad for your script installation as it displays the database name, the username and the only thing you have to remember is the password.

That information is also available on your main database page in the format below is just isn't as easy to copy and paste.

At this point you should have something like this in your notepad file:
Database host name: localhost
Database name: CPuser_dbName
Database Username: CPuser_username
Password: what-ever-you chose

You are now ready to configure your scripts using the information above to connect to the database.