DNS Technology Consultants, Inc.
 
 
 

Connecting Dreamweaver MX to MySQL

After you have added your new site to Dreamweaver, if you want to incorporate data from MySQL, you will need to make a connection to the database.

To do this, we will assume that you have the MySQL database already established, the username and password, and you have remote access permission to the database.

The first time that you try to connect to a database for a "new" domain or website can be a little tricky. There are some files that needs to be located within the directory of our source code and within the directory on the website. To make things easier, sometimes we will just copy these files from previously established sites.

One folder in particular is the _mmServerSpripts folder (and the files located inside the folder). When you try the following procedure to define a database connection the first time, sometimes Dreamweaver will error out; however, if you notice, it will create these files within your directory. You will need to exit Dreamweaver, and FTP this folder up to the server.

If you receive any error messages when trying to perform the following, check to make sure you have the appropriate files in the directory in order to make the connection.

How to Connect a Database - MySQL Connection

  1. Under Application - Bindings (windows on the right), click the + to add a new recordset.
  2. Next to the Connection, Click the Define... button.
  3. Click the new button.

    Adding a new database to Dreamweaver

  4. Enter the Connection Name (Cannot start with numbers and cannot have spaces)
  5. For MySQL Server, enter the web address URL
  6. For Username (enter the one provided from admin)
  7. For Password (enter the one provided from admin)
  8. Click the Select next to the Database - This will then connect to the MySQL sever and present you a list of available databases. Select the one you want and click OK.
  9. At this point, Dreamweaver will create a directory called Connections, and inside that folder, place the files needed to connect to the database. You will need to FTP those files (and folder) to the webserver.

Connecting a Table to the Page

Now that you have connected the database to the "site", it will remain there until you remove it (if you want too later on). You now have access to add bindings to data tables and can use them as content on your webpage.

The following video is a quick tutorial on how to make that connection:

 
 
 
 
 
 
Copyright © 2017, DNS Technology Consultants, Inc.
all rights reserved