MySQL with FDT

Setting up FDT as a MySQL development environment using the Database Development perspective is quite easy. I assume that you have MySQL installed installed. The only other part you need is the J/Connector

Download the  Connector/J MySQL Database Driver.

The current version is 5.1.3, unzip the connectents of the file, and place it someplace. I put the file in my common libs folder, I was not sure if there was a place in the MySQL folder where drivers are located. The zip comes with a bunch of files but the only one you will need is the “mysql-connector-java-5.1.13-bin.jar”

Now in FDT, and switch to the “Database Development” perspective. (Window –> Open Perspective –> Other –> Database Development perspective)

[box] After you open the perspective choose a new connection [/box]

[box] On the pop-page of the Connection Profile Wizard, select the MySQL connection profile, name your connection, and then click next[/box]

[box] you will need to pick the type of driver that you want to use(we are using 5.1 here so pick that one)[/box]

[box] There are no drivers set up so click on the circle to the right of the pull down menu,and switch to the jar tab.[/box]

[box] there is a slight issue as the original driver here does not work, which is the reason for downloading the driver from MySQL, just delete the old one[/box]

[box] you should be left with only your driver, just point to the area where you saved it.[/box]

[box] set up your database information, and test the connection, you should see “ping succeeded”[/box]

[box] the original look of the newly created database[/box]

[box] to get to the data, right click on the database table and sample content or edit[/box]

[box] I went with edit,as it is a little cleaner I think, and there is also a window to write your own SQL! [/box]

That is all there is too it, you now how MySQL working inside of FDT.

You can also create database tables using this method.

[box] to start use the file menu, and create a new sql file, this allows you to include the sql file along with your project. this way is sloppy(sorry for that!) it is better to crate a new project and link it to the FDT project that you are working on, as this creates a new folder automatically for you. In my case I create a new sql file called meetings.sql and in it’s properties I link it to the project, and set up all the properties needed.[/box]

[box] In the newly created sql file you have the sql editor where you can create a new table with the properties you want, then just right click and execute. I did this in two steps to show that you can continue using the editor to do whatever you can do with sql. There is even sql code completion :)[/box]

[box] Each time you will be showed your results, and if you have any errors in your sql[/box]

[box] Now you can view the results in the Data Source Explorer, and then I show you can edit the data visually, or just sample the content. Below is a final image showing the results.[/box]

I hope you enjoyed the tutorial on setting up and working with MySQL with FDT

In part 3 of the series, we will set up the cross domain file, and create a flash remoting project with FDT 4 & ColdFusion 9 🙂

2 thoughts on “MySQL with FDT”

  1. Hi,
    thanks glad you liked the post.
    I am a ColdFusion guy so the tutorial series is based on using ColdFusion, MySQL and FDT. The same should apply to using the php plugin in FDT, which I think I saw some posts mention how to do this.

    Maybe I will write one for php plugin too 🙂

Leave a Reply