web hosting line
1.866.605.2484
Free Web Hosting

MySQL Tutorial

Creating MySQL Database and User

Step 1: Creating a MySQL Database

Creating a MySQL database with the cPanel, which is included in all of the SiteGround's Linux hosting plans is quite an easy task. In order to create a MySQL database on your hosting account you need to log in your cPanel. This can be done by either using the "Go!" button in the "Manage Accounts" section of the customer's area as shown in the image below:

Or by using one of the following URLs:

yourdomain.com/cpanel
cpanel.servername.com

Where servername stands for the server that hosts your account.

Once in the cPanel you should go to the "MySQL Databases" section by clicking on its icon . When empty, the section looks like this:

To create the database, you need to fill a name in the field an click on the "Create Database" button:

This will lead you to a page, which confirms that the database creation was successful.

Important You need to create at least one database user and grant that user permission to use the new database. Refer to Creating a MySQL user and Grant a user's permissions to a MySQL database for more information.

Step 2: Creating a MySQL user

Click on the "Go Back" link to continue with the creation of a user, who will be able to connect to the newly created database. Creating a user is much like any other registration. You just need to fill in the desired user name and password like shown in the image below:

And press the Create User button. Again a confirmation page is loaded.

Important Creating a user does not automatically allow the user to use a database - you need to grant that user permission to the specific database first. Refer to Grant a user's permissions to a MySQL database for more information.

Step 3: Add Users To Your Databases

Click on the "Go Back" link to continue setting up the database. In order for the user to be able to access the database he needs to be added to it. This is done from the last section "Add Users To Your Databases". Select the user from the drop-down menu on the left, and the database name from the drop-down menu on the right. The "All" box is checked by default, so leave it as it is, just click on the "Add User to Database" button. Again a confirmation page is loaded. Click on the "Go Back" link and you will see that a set of Connection Strings have appeared just below the database name. This means that all the steps have been successfully completed.

Important The user will only have permission to change things you have given them the privileges for. Make sure the user has privileges for everything they need to modify.



PHP Hosting
(c) Copyright 2006 SiteGround Web Hosting Provider. All rights reserved
Previous Next
Resources: Tutorials . Video Tutorials . Web hosting FAQ . Joomla templates . WordPress themes . Web hosting forum
Quick links: eCommerce hosting . Joomla hosting . Magento hosting . phpBB hosting . WordPress hosting . Blog Hosting . cPanel hosting . FTP hosting . Flash hosting . Website Design
Copyright © 2009 SiteGround.com Inc