close ad
Install the LAtest Updates to Work with CC 2017 and CC 2018
open ad
View Menu

Web development tutorial

Getting Started with Dynamic Connections

Tutorial created by Team WebAssist

Categories: Data Bridge, Dreamweaver, MySQL, PHP

rating

Dynamic Connections provides various functionality for defining MySQL Database Connections in Dreamweaver that is otherwise not available in Dreamweaver's default Database Connection interface.

If you often create two different database connection files (one for testing and one for remote), using Dynamic Connections will allow you to create one database connection file that uses the appropriate database based on the domain your page is being displayed on. You can even use this tool if you want to switch databases for different sites.

This Getting Started Guide runs through the process of creating a dynamic MySQL database connection in Dreamweaver using Dynamic Connections.

arrow downRequirements

You will need the following items before starting this tutorial:

  1. Dreamweaver CS3 or later
  2. Dynamic Connections Installed (click here for installation instructions)
  3. MySQL Database Connection details
  4. Dynamic Site Defined in Dreamweaver
    For more information see Defining a dynamic site in Dreamweaver

arrow downLaunch Dynamic Connections

Once installed, this extension adds a Dynamic MySQL Database Connection option to the Dreamweaver Databases panel that you can use to create your database connections going forward.

Before you will be able to access this option, you must first have defined your Dreamweaver site as a PHP/MySQL site and have the database connection information available.

  1. With your PHP page open, click Add from the Databases panel (Window > Databases).
  2. Choose Dynamic MySQL Connection to launch the interface.
With this tool installed you will no longer need to use the built-in MySQL Connection interface provided by Dreamweaver

arrow downPrimary Connection

The primary connection is the default connection that will be used for any domain that is not configured under Additional Connections.

  1. Enter the details for your primary database connection as you would using Dreamweaver's built-in tool.

    1. Connection name: Enter a name for this connection. Your connection should not have spaces or any special characters.
    2. Charset: Select the character encoding preferred for this connection.
      If you do not know what this is, leave default selected.
    3. MySQL server: Enter an IP address or the server name for the computer hosting MySQL.
      If you are configuring the database connection for you local machine, you can enter localhost.
    4. User name: Enter your MySQL user name.
    5. Password: Enter your MySQL password
    6. Database: Enter the name of the database you wish to use, or click Select to choose the database from a list of databases available on the specified server.


  2. Once entered, choose the Test button to confirm the connection is correct.
  3. Proceed to the Additional Connections tab to configure details for other databases and domains.

arrow downAdditional Connections

You can add as many additional connections as you like. Each connection can be associated to any number of domains. When the database connection file is run on a specified domain, it will use the connection that you configured.

  1. Click Add to enter an additional connection.
  2. In the fields below the tree, enter the details for the connection.
    Use the lightning bolt if you wish to specify any of these values dynamically.
  3. In the Domains field, enter all the domains (separated by a comma) that you wish this connection to be used for.
  4. Click Add to create another connection.
  5. Continue adding connections for all the domains you need.
  6. Once you have configured all your connections, click Finish to have the connections file created.


Dynamic Connections create a connections file in your Connections folder the same way it is done by Dreamweaver's connection interface. The Database Connection file will contain all the connections you specified with conditional behavior applied to determine which connection should be used when.

Simply upload this Connections folder with your site as normal, and Dynamic Connections will make sure to use the right database when necessary.

arrow downReviews and comments

Comments will be sent to the author of this tutorial and may not be answered immediately. For general help from WebAssist, please visit technical support.

Sign in to add comments
rating

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.