Creating a database connection
The final step of the setup process is to create a connection to the database.
To create a database connection in Dreamweaver:
- Open any PHP page in Dreamweaver and then open the Databases panel (Window > Databases).
- Click the Plus (+) button on the panel and select MySQL Connection from the pop-up menu.
The MySQL Connection dialog box appears,
- Enter connTownsend as the connection name.
- In the MySQL Server text box, specify the computer hosting MySQL.
Enter an IP address or a server name. If MySQL is running on the same computer as Dreamweaver, enter
- Enter your MySQL user name and password.
If you didnt define a user name while configuring your MySQL installation, enter root in the Username text box. If you dont have a password, leave the Password text box blank.
- In the Database text box, enter CafeTownsend.
CafeTownsend is the name of the sample MySQL database you created (see Creating the MySQL database).
- Click Test.
Dreamweaver attempts to connect to the database. If the connection fails, do the following:
- Double-check the server name, user name, and password.
- Check the settings for the folder Dreamweaver uses to process dynamic pages (see Specifying where dynamic pages can be processed (PHP)).
- Consult Troubleshooting Database Connections in Using Dreamweaver (Help > Using Dreamweaver).
- Click OK.
The new connection appears in the Databases panel.
The sample PHP application is now set up for the tutorials in Getting Started with Dreamweaver. For more information, see Tutorial: Developing a Web Application.