PHP and MySQL in Dreamweaver MX

This tutorial will walk you through the following:

  •  Installing MySQL
  •  Set up of phpMyAdmin
  •  Creating your database
  •  Connecting to database
  • Connecting to your database

    The last thing that we will do in this tutorial is make the connection from Dreamweaver to our database

    Create a new site in Dreamweaver called dmxzone using the PHP/MySQL server technology.  Create a blank Dynamic PHP page. 

    From the Databases tab in the Application panel click the + button and choose MySQL connection.  In the MySQL Connection dialog give your connection a name.  Enter the MySQL server - in this case it will be localhost.  Even if you are designing pages to be hosted at an ISP, the MySQL server will invariably be on the same machine as the web server, so you can always specify localhost as the MySQL server.  In the User Name box enter the user we created - dmxzone.  If you are hosting at an ISP, either you would have set this user name up with a Control Panel of some kind, or the ISP would have given you your MySQL username and password.  Once you have put in the password you can click on Select to see a list of the databases on your server:

    Select dmxzone and click OK.  Click OK again in the MySQL Connection dialog and Dreamweaver will create the connection for you.

    You will now be able to use the Databases tab to browse the tables within your connection.

    In the next article we will look at how we use this connection to build data aware pages in Dreamweaver.


    About the author

    Allan has been programming seriously for the last 9 years and other than a single blemish when he achieved a diploma in Cobol programming,  is entirely self taught.  He runs his own company where they try to make a living out of making a lot of noise and playing Quake.  When that doesn't work they make a lot of noise while doing development and design for an ad agency.  Allan lives in Cape Town, South Africa with his girlfriend and 4 cats.

    He has recently co-written three books for glasshaus, one for the dreamweaver pro series, and is a bit of a guru on matters PHP and MySQL related.

    Allan Kent

    Allan KentAllan comes from Cape Town, South Africa. He has been implicated in writing for several WROX, glasshaus, Wiley and Apress publications, generally in the 'cool stuff that PHP can do' sections.

    You can catch up with him at his website http://www.mediafrenzy.co.za.

    See All Postings From Allan Kent >>

    Comments

    DBTools is better!!!

    February 25, 2003 by Mané da Ilha
    I think that DBTools manager is better then phpmyadmin. Please, look at this www.dbtools.com.

    Sorry!!!

    February 25, 2003 by Mané da Ilha
    Sorry, the correctly URL is www.dbtools.com.br/EN.

    RE: Sorry!!!

    February 25, 2003 by Tim Green
    Except that DBTools is a Win32 Executable, rather than a web-based administration system. The advantage of phpMyAdmin is that you can ensure that your MySQL databases are administrable from anywhere, regardless of platform.

    DBTools has no such strength.

    It worked for me :o)

    March 2, 2005 by Harry Nibble

    Thanks for this tutorial.

    I had a few questions like "what does that mean" or "now what" but that was to be expected because I was not setting this up on a local machine.   As the tutorial was aimed at a local machine, there is little surprise there.   Also  for some strange reason I could not use phpMyAdmin and had to use Webmin as already installed.

    The part that really helped me was getting DMX to connect.   The followup tutorial was even much more helpful.

    Thanks for a brilliant tutorial 

    See all 7 Comments

    You must me logged in to write a comment.