MySQL is not a single database, but a database management system. You create individual databases within MySQL. The superuser, root, has complete control over all databases, so it's necessary to set up user accounts with restricted privileges to prevent unauthorized users gaining access to other people's data.
In this section, you'll use the phpMyAdmin front end to MySQL to create a database, import sample data, and create a MySQL user account. The instructions assume that you have installed XAMPP on Windows, MAMP on a Mac, or that you have created your own PHP testing environment with a web server, PHP, MySQL, and phpMyAdmin.
This section covers the following topics:
To perform this task:
Verify that your web server and the MySQL server are running: Enter http://localhost/phpmyadmin/ into your browser address bar and load the page.
If you installed XAMPP in Windows, enter root as the username, and then your MySQL root password when prompted.
You should see a phpMyAdmin welcome screen similar to the one shown in Figure 10.

Figure 10. The phpMyAdmin main screen
Note: The default list of databases shown in the menu on the left of the screen is slightly different in XAMPP and MAMP, but this is not important.
Note also that at the time of writing this article, both XAMPP and MAMP were still using version 2 of phpMyAdmin, even though version 3 had been released several months earlier. Version 3 is required only for MySQL 5.1. Otherwise, the functionality is identical, although there are some differences in the user interface.
Note: When choosing names for databases and database columns (fields), do not use spaces or hyphens; use only alphanumeric and underscore characters (for example, feedback_demo). Although phpMyAdmin accepts such characters, they require special handling and are likely to cause problems. It's also a good idea to use lowercase throughout, because the Windows version of MySQL automatically converts names to lowercase and treats them as case-insensitive. Most PHP sites are hosted on Linux servers, which are case-sensitive. If your names include uppercase characters, everything will break when you upload your web application from Windows to a Linux server.
Note: You can ignore the Collation pop-up menu, unless you are using a language other than English. Collation determines the sort order of records. The default setting is fine for English.
Note: The dummy data consists of just two tables: customers and products, which should now be listed in the phpMyAdmin menu on the left of the screen. You can inspect the data by clicking the table name, and then selecting the Browse tab at the top of the page. Each table contains only two records. The purpose is simply to demonstrate how to import data with phpMyAdmin.
The root superuser should be used only for administrative tasks inside phpMyAdmin, because it has the power to wipe out all of your data. After data has been deleted, you cannot restore it! There is no equivalent of the Windows Recycle Bin or Mac Trash in MySQL. So, the next task is to create a MySQL user account with restricted privileges. The following instructions show you how to create an account that has access only to the adc_demo database.
Select the database name from the pop-up menu, as shown in Figure 11.

Figure 11. Limiting a MySQL user account to a specific database
Note: The underscore in the database name is preceded by a backslash. In certain circumstances, the underscore can be used as a wildcard character in MySQL, and the backslash is needed here to ensure that the underscore is treated as a literal character. However, this is an exceptional case. Normally, you should not precede the underscore in database, table, or column names with a backslash.
This opens a page where you can set the user's privileges for the selected database. For a web application, only four privileges are normally required: SELECT, INSERT, UPDATE, and DELETE. Select them and click the Go button (see Figure 12).

Figure 12. Setting user privileges for a web application
You now have a MySQL user account ready to access the feedback database. In the next section, you'll learn how to create a MySQL connection in Dreamweaver.