Samples Product Information Home Page Download Pricing

Creating a MySQL database.

CleverCat's PHP files are designed around mySQL and I'll be using phyMyAdmin in this tutorial as this utility should be available to almost every website owner. If you are already comfortable using phpMyAdmin you can skip ahead to that section.

Control Panel

Every website owner should have access to some sort of Control Panel for administering their website. You may have to contact your website hosting company for more information if you do not already know how to access this. cPanel is one of the most popular and that's the utility I'll describe here. Your website host may provide their own tutorials for their control panel and you should refer to that if you need more information.

 

To begin, login to your control panel. This screenshot of cPanel may be a different version than your own but you should be able to find the functions you need to continue. Look for the section called Database. Under this heading you may see a link for phpMyAdmin and, if you are familiar with this, you can jump right in and create the database and user information manually. Skip to phpMyAdmin

Some control panels provide an simpler database wizard or the host may have even disabled the ability to create users in phpMyAdmin. In this case, look for a function called Database Wizard. If there are several database options, be sure to select the one for MySQL.

At this point, the steps I describe may not match the ones you need to follow but they should be similar enough that you can work it out on your own or follow the tutorials provided by your host.

My cPanel provides two methods for creating databases and users.

The screenshot to the left shows a form which allows me to create a database and user on a single form.

You can see that there are empty fields where you can type in the name of the database and the username you want to create.

I've already created the database newDatabase and user newUser and, at the bottom of the form, you can see the option to add that user to the database.

The second method guides the user through step-by-step. Select the method you are most comfortable with.

Step 1

In my guided example, the wizard creates the database first but your control panel may require that you create a user before you can create a database.

Note that the database name may be prefixed by the name of your domain or account.

In my examples, the full name of the database will be mySite_newDatabase and that will be important later on.

Step 2

In the next step, the Database User is created and again the full user name is prefixed with mySite_.

Note that it is typical for the prefix to be cut off at eight characters. For example, if your site name were myCatalogSite.com, the prefix might be myCatalo_.

Step 3

In the next step, the user's privileges are assigned.

For now, you can give the user all privileges. After the setup is finished, if the pages you create are going to be publically available, you may want to return to the control panel and restrict the privileges to the minimum required to use the pages.

 

Return to Tutorial Selection or Continue to the next chapter: phpMyAdmin