Setting up the MySQL database

The WordPress software is a personal publishing system that uses a PHP-and-MySQL platform, which provides everything you need to create your own blog and publish your own content dynamically without having to know how to program those pages yourself. In short, all your content (options, posts, comments, and other pertinent data) is stored in a MySQL database in your hosting account.

Every time visitors go to your blog to read your content, they make a request that's sent to your server. The PHP programming language receives that request, obtains the requested information from the MySQL database, and then presents the requested information to your visitors through their Web browsers.

Every Web host is different in how it gives you access to set up and manage your MySQL database(s) for your account. In this section, I use a popular

<m<a hosting interface called cPanel. If your host provides a different interface, the same basic steps apply; just the setup in the interface that your Web host provides may be different.

To set up the MySQL database for your WordPress blog with cPanel, follow these steps:

1. Log in to the administration interface with the username and password assigned to you by your Web host.

I'm using the cPanel administration interface, but your host may provide NetAdmin or Plesk, for example.

2. Locate the MySQL Database Administration section.

In cPanel, click the MySQL Databases icon.

3. Choose a name for your database, and enter it in the Name text box.

Be sure to make note of the database name, because you will need it during the installation of WordPress later.

For security reasons, make sure that your password isn't something that sneaky hackers can easily guess. Usually, I give my database a name that I will easily recognize later. This practice is especially helpful if you're running more than one MySQL database in your account. If I name this database something like WordPress or wpblog, I can be reasonably certain — a year from now, when I want to access my database to make some configuration changes — that I know exactly which one I need to deal with.

4. Click the Create Database button.

You get a message confirming that the database has been created.

5. Click the Go Back link or the Back button on your browser toolbar.

6. Choose a username and password for your database, enter them in the Add New User text boxes, and then click the Create User button.

You get a confirmation message that the username was created with the password you specified.

Make absolutely sure that you note the database name, username, and password that you set up during this process. You will need them in the next section before officially installing WordPress on your Web server. Jot them down on a piece of paper, or copy and paste them into a texteditor window; either way, just make sure that you have them immediately handy.

7. Click the Go Back link or the Back button on your browser toolbar.

8. In the Add Users to Database section, choose the user you just set up from the User drop-down menu; then choose the new database from the Database drop-down menu.

The MySQL Account Maintenance, Manage User Privileges page appears in cPanel.

9. Assign user privileges by selecting the All Privileges check box.

Because you're the administrator (owner) of this database, you need to make sure that you assign all privileges to the new user you just created.

10. Click the Make Changes button.

A page opens with a confirmation message that you've added your selected user to the selected database.

11. Click the Go Back link.

You go back to the MySQL Databases page.

Was this article helpful?

0 0

Post a comment