How to set up a MYSQL database for Joomla, using cpanel

Part 1

Before you can use Joomla you must have a mysql database in which Joomla will store all the content for you website. These instructions show how to set you a mysql database, using the popular cpanel control panel that is provided by many web hosting services.

This tutorial assumes . . .

  • your hosting uses the cpanel control panel
  • you know how to open cpanel
  • you have already uploaded the Joomla package to your server

Database setup for Joomla

These are the steps, we'll go through them with screenshots of each to show exactly how set up the database for Joomla.

  1. Open your cpanel control panel
    then Select the MYSQL icon by clicking it
  2. Enter a name for the new database then create the database
  3. Enter a name and password for a user of databases in general, then create the user
  4. Allocate the user to the new database

Here are the detailed instructions with screenshots, the confirmation screens are not shown - otherwise this would be a much longer page.

 

1

Start by opening cpanel, in most cases you will enter something like http://your_domain_name.co.uk/cpanel although the exact method will vary. When you arrive at the cpanel you will see something like this . . .

 

go to top of page
cpanel screenshot showing mysql icon

Click the MYSQL Databases icon to use the MYSQL tools

2

In the box labeled New Database type the name you want for the database.

If you have a server that is shared between many users you may find that the actual database name is something like your login name followed by the name you typed in the box. This happens because there is only one copy of MYSQL on the server and it is shared between all the users.

This is not usually a problem, but if you have a very busy site that appears to serve slowly at peak times then you may need to upgrade your hosting package.

You will get a confirmation screen - write down the details.

go to top of page
cpanel screenshot showing mysql icon

Type the name you want for the database in the box, then click the Create Database button

3

Next enter a username and password for the database user. This should be different from your hosting login and password. My personal preference is for a distinct user for each database for additional security.

Note the name of the database you created at step 2, it's shown now.

You will get a confirmation screen telling you that the user was added and showing the password, write them both down.

go to top of page

 

cpanel screenshot showing msql user setup

Type the username and password you are going to use to access this database, then click Create User.
Note the database name shown above.

4

Associate the user and database that you just created. Mysql can handle different types of user with different privileges, as you are the only user in this case you can give yourself all privileges, but that might not be the case for a larger system.

There are two drop-down list showing users and databases, select the appropriate items, make sure the 'ALL' checkbox is checked and click the Add User to Database button.

You will get a confirmation screen.

go to top of page
cpanel screenshot showing msql user setup

Select the appropriate user and database from the drop down lists then click the Add User to Database button

go to top of page

Part 2 of this tutorial

 

 

Part two of this tutorial