Advertisement

How to Create a MySQL Database for WordPress

In WordPress, your content (options, posts, comments, and so on) is stored in a MySQL database in your hosting account. One of the first steps in creating a WordPress site is to create this MySQL database.

WordPress software is a personal publishing system that uses a PHP/MySQL platform. When a website visitor attempts to read your site content, their web browser makes 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 allows you to set up and manage your MySQL database(s) for your account. cPanel is a popular hosting interface. If your host provides a different interface, the same basic steps apply.

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

    The cPanel administration interface is shown here, but your host may provide NetAdmin or Plesk, for example.

  2. Locate the MySQL Database Administration icon in your cPanel.

    In cPanel, click the MySQL Databases icon. The MySQL Databases page appears.

    image0.jpg
  3. Enter a name for your database in the Name text box.

    Be sure to make note of the database name because you need it when installing WordPress.

    Give your database a name that you'll easily recognize later. This practice is especially helpful if you run more than one MySQL database in your account.

  4. Click the Create Database button.

    A message appears, confirming that the database has been created.

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

    This returns you to the MySQL Databases page.

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

    A confirmation message appears stating that the username was created with the password you specified.

    For security reasons, make sure that your password isn't something that sneaky hackers can guess easily. During the database-creation process, cPanel gives you a handy tool to create a password using a very secure combination of numbers, letters, and symbols that makes it virtually uncrackable.

    Make absolutely sure that you note the database name (from Step 3), username, and password that you set up during this process. You need them before officially installing WordPress on your web server.

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

    This returns you to the MySQL Databases page.

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

    The MySQL Account Maintenance, Manage User Privileges page appears.

  9. Select the All Privileges check box to assign user privileges.

    Because you're the administrator (owner) of this database, 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 the selected user to the selected database.

  11. Click the Go Back link to return to the MySQL Databases page to see your new MySQL database and user listed on the MySQL Databases page.

blog comments powered by Disqus
Advertisement
Advertisement

Inside Dummies.com