Support / KnowledgeBase

 
Search the KnowledgeBase Search

Dreamweaver - PHP/MySQL Configuration

  • Applies to: All DV, Grid

  • Difficulty: Easy

  • Time needed: 10 minutes

  • Tools needed: Dreamweaver

 
  • Applies to: Grid
    • Difficulty: Easy
    • Time: 10
    • Tools needed: Dreamweaver
  • Applies to: All DV
    • Difficulty: Easy
    • Time: 10
    • Tools needed: Dreamweaver

Overview

This article will help you configure a PHP and MySQL testing server in Dreamweaver.

READ ME FIRST

(mt) Media Temple does not support third-party software. This Dreamweaver tutorial is provided as a courtesy. For information on Dreamweaver, please see: adobe.com/products/dreamweaver.html.

Requirements

Before you start, you must already have a database, username, and password set up on your server. For more information, please see:

Instructions

  1. First, create a "Site" to hold your files. When creating the site, be sure to specify that you want to use the "PHP MySQL" server technology.
  2. Set up a "Testing Server" using the same information as the remote server. The Server Model should be set to "PHP MySQL," and the Access menu should be set to "FTP." See the link to the FTP article above for more information on FTP in Dreamweaver.
  3. Create a new PHP file in the site by selecting "Site" in the Site tab of the Files panel. Then press Ctrl+Shift+N.
  4. Change the new file's name from untitled.php to something that makes sense to you. Then, double-click the file to open it. This file MUST be PHP, or you will not be able to access the database.
  5. Now, it's time to set up a database connection. Click the "Databases" tab of the Application panel, and then the + button. Alternatively, from the Window menu, select Databases.
  6. In the MySQL Connection dialog box, fill in the following information:
    • MySQL Server: The database server host name. Your database server host name is internal-db.s00000.gridserver.com, where 00000 is your site number.By default, this is "localhost," which will work on the DV server as-is.
    • Username: Your database username, which should be of the form db00000_useras configured in Plesk.
    • Password: Your database password.
    • Database: Your database name. This should look like db00000_dbname.

    See Database users on the GridHow do I create a database? for further assistance with these fields.

    DW_MySQL_Conn

     

    Click the Test button in the dialog box to make sure that the information you've entered works correctly.

    See this article for additional Grid connection information: Why can't I connect to my MySQL database from PHP?

NOTE:

There is a known bug in Dreamweaver that does not allow for automatic table name discovery in databases with hyphens in the name, so this may affect you if your databases include a hyphen. The workaround is to manually specify table names in queries. Once the name is specified, Dreamweaver is able to query such databases.

 

Continue