How to Create a Website Database

By Michael Dance

All but the smallest websites these days use databases to organize their content. Instead of placing important content directly in HTML files, eventually resulting in thousands of files, new content is added to the database. When the content is requested by a visitor, a PHP page grabs it and spits it out in HTML for the world to see. Most commonly, you'll need to create a database on your Web server because you're installing a content management system (CMS) such as Joomla, Drupal or WordPress that requires one.

Step 1

Log into your website control panel provided by your Web host.

Step 2

Locate the section or tab for "Databases" or "MySQL." The vast majority of Web hosts run databases on MySQL, a database server that works well with the PHP language.

Step 3

Select "Create Database" or an equivalent option.

Step 4

Input a database name, user name and password. The way MySQL works, each database is assigned a user, but since there's usually only one user--yourself--some Web hosts don't ask for a user name and automatically make the database name and user name the same. Other Web hosts automatically use your account's login name as the user name and use that name as a prefix to the database name. Make sure you check which policy your Web host uses.

Step 5

Log into the database after you've created it by clicking on the database name or an "edit" option next to the database name. You will be presented with phpMyAdmin, a database interface program that allows you to control your database without any code. If you're populating the database yourself, start by clicking the name of your database in the left column to add tables. Most likely, the CMS you install will populate the database for you once you give it your database login information.