Installing Drupal: Database Setup - dummies

Installing Drupal: Database Setup

By Lynn Beighley, Seamus Bellamy

Prior to actually installing Drupal you need to set up a database. A database is a set of files that contain data, stored in a special format. You come in contact with databases all the time. For example, every time you look up something on Google, a computer program compares what you typed in the Search box to information stored in a database.

The program that communicates with a database is called a database server. Drupal uses a database to keep track of all kinds of data; for example, Drupal can create a forum for your users. All the postings your users type are stored in the Drupal database. And the people you allow to log in to your site have their usernames and passwords stored in your Drupal database.

To allow Drupal to save all this information, Drupal needs its own database that it can write information into and read information from. Fortunately, most web hosts provide an application that lets you create and manage the database your Drupal program needs.

Databases may or may not be located on the same computer as your website. Your web host may need to tell you where and how to create a database and what username and password you need to use to connect to it. The steps in this example assume that your MySQL program is located on the same machine as your Drupal files. This is the most common setup.

Drupal needs a database, and you have to create one if you aren’t using Fantastico. You may also have to create a database username and password. This varies tremendously from one web host to another, but here are the general steps to follow:

  1. Locate the e-mail from your web host that has your username, password, and login information. Browse to the web host’s site and log in.

    You will see some sort of control panel with options for your new website.

  2. Find and click a link that refers to MySQL as part of the name.

    We’d like to be more specific, but this step varies too much from web host to web host.

    You’re looking for a way to create a database. For example, notice the MySQL link on the right. Clicking that causes a link to Databases to appear. And then clicking the Databases link gives you a form on the right where you type in the name of a new database.


  3. Type drupal as the name of your new database, and click the Add button.

    Applications that allow you to create databases are fairly common, but if you don’t find one, you may have to contact the technical support department of your web host. Other programs that allow you to create databases may be called things like MySQL Databases or MySQL Database Wizard. The whole point is to find an application that lets you create a database.

  4. Add a database username and password (if your web host didn’t send any) by locating an application in your control panel that lets you add users to MySQL.

    Make sure you keep this database username and password handy. You will need it when you install Drupal.

    It would be wonderful if this step was easier to explain, but every web host is different. Some may have a simple link called Users that opens a form where you enter a username and password.

    Some web hosts send you a username and password just for MySQL. And some use the same username and password you were assigned to access your site’s control panel. If you can’t find them, consult your web host’s help documentation and technical support.