316 Setup for Sample PHP Site
To create a database connection:
1. Create the sample MySQL database using the SQL script (see “Creating
the MySQL database” on page 316).
2. Create the connection in Dreamweaver (see “Creating a database
connection” on page 318).
Creating the MySQL database
The sample files for Dreamweaver include a SQL script capable of creating
and populating a sample MySQL database.
Before starting, make sure MySQL is installed and configured on your
local or remote computer. Download the latest version from the MySQL
website at http://dev.mysql.com/downloads/. For development purposes,
download and install the Windows Essentials version of the MySQL
database server.
To create the sample MySQL database:
1. Copy the SQL script file, insert.sql, to an appropriate folder on the
computer that has MySQL installed.
If you installed Dreamweaver to its default location, the path to the
script file is as follows:
■ C:\Program
Files\Macromedia\Dreamweaver 8\Tutorial_assets\cafe_townsend\
data\insert.sql (Windows)
■ /Applications/Macromedia Dreamweaver 8/Tutorial_assets/
cafe_townsend/data/insert.sql (Macintosh)
If the computer running MySQL is a Windows computer, copy the
insert.sql script to Program Files\MySQL\MySQL Server 4.x\bin. If
the computer running MySQL is a Macintosh, copy the insert.sql
script to your Documents folder in your home folder.
2. On the computer that has MySQL installed, start the MySQL
Command Line Client (Windows) or the Terminal (Macintosh).
■ In Windows, start the MySQL Command Line Client by selecting
Start > MySQL > MySQL Server 4.x > MySQL Command Line
Client.
■ On the Macintosh, start the Terminal by going to the Applications
folder, opening the Utilities folder, and double-clicking Terminal.