SitePoint Sponsor

User Tag List

Results 1 to 11 of 11
  1. #1
    SitePoint Wizard TWTCommish's Avatar
    Join Date
    Aug 1999
    Location
    Pittsburgh, PA, USA
    Posts
    3,910
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Cold Fusion DSN connection to MySQL?

    Subject says it: I've got a DSN connection to an Access DB, but I want to know if I can create a DSN connection to a MySQL connections within Cold Fusion...and if I can, will I need to change the way I connect to things...IE: will I need to start including a username/password somehow?

  2. #2
    I'm a college yuppie now! sbdi's Avatar
    Join Date
    Jul 2000
    Location
    Dublin , Ireland
    Posts
    1,271
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It shouldnt be any different in your scripts, I've never used Mysql with CFM but if you do need a username and pass just stick it in the query section of your scripts.
    Back Again

  3. #3
    SitePoint Wizard TWTCommish's Avatar
    Join Date
    Aug 1999
    Location
    Pittsburgh, PA, USA
    Posts
    3,910
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Query section? What query section?

  4. #4
    SitePoint Addict ownersite's Avatar
    Join Date
    Jul 2001
    Posts
    222
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    TWTCommish,

    How did you setup your DSN connection to the Access database? If you are on a Windows box, your probably went into the Control Panel, chose OBDC, named the DSN, selected the Access file, etc. (may be slightly different depending on version of Windows)

    The same process should work for a MySQL connection...providing that you have installed the ODBC drivers for MySQL on your machine.

    If you created your "datasource" using the ColdFusion administrator, the same process would work for a MySQL connection...providing, of course, that you have installed the ODBC drivers for MySQL.

    Download site for MySQL ODBC drivers
    F150online- 102,000 users strong and growing...
    Ownersite.com
    - tools to enhance vehicle ownership

  5. #5
    SitePoint Wizard TWTCommish's Avatar
    Join Date
    Aug 1999
    Location
    Pittsburgh, PA, USA
    Posts
    3,910
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Crap, I think I tried that awhile back. Is setting up those drivers difficult?

  6. #6
    SitePoint Addict kevin_tremblay's Avatar
    Join Date
    Jul 2001
    Location
    Boston Area (North shore)
    Posts
    233
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Use MySqlODBC and you should be all set. I am currently using it here at work. Not hard to set up either.

    Kevin -- Digitalman
    Kevin Tremblay-- Sys Admin
    work: kevin_tremblay@hsgmed.com
    "The object of the journey is not to arrive."

  7. #7
    SitePoint Addict ownersite's Avatar
    Join Date
    Jul 2001
    Posts
    222
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Crap, I think I tried that awhile back. Is setting up those drivers difficult?
    If I recall correctly, it's as simple as downloading the MyODBC file and double-clicking on the setup icon, just like most Windows installation programs.
    F150online- 102,000 users strong and growing...
    Ownersite.com
    - tools to enhance vehicle ownership

  8. #8
    SitePoint Addict kevin_tremblay's Avatar
    Join Date
    Jul 2001
    Location
    Boston Area (North shore)
    Posts
    233
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    No really easy, download MySqlODBC and install it on your machine, then go into ODBC setups and add a DSN for the database and there you have it.

    Kevin -- Digitalman
    Kevin Tremblay-- Sys Admin
    work: kevin_tremblay@hsgmed.com
    "The object of the journey is not to arrive."

  9. #9
    SitePoint Wizard TWTCommish's Avatar
    Join Date
    Aug 1999
    Location
    Pittsburgh, PA, USA
    Posts
    3,910
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hmmm, this isn't working. It seems I can't get MySQL and CFML running at the same time...I need to get Apache running to have MySQL running, which means PWS can't run, so that CFML can't run. I know there's a way around this, but I'm too stupid to figure it out.

  10. #10
    SitePoint Addict ownersite's Avatar
    Join Date
    Jul 2001
    Posts
    222
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    TWTCommish,

    MySQL should run, regardless of the application server (ColdFusion) or the web server (Apache or PWS) that is running. Are you getting any particular error message when starting MySQL?

    You should also be able to use PWS as your web server, ColdFusion as your application server and MySQL as your database server. There is no Apache requirement to run MySQL...

    But, perhaps I am misunderstanding the problem, please elaborate.
    F150online- 102,000 users strong and growing...
    Ownersite.com
    - tools to enhance vehicle ownership

  11. #11
    SitePoint Addict kevin_tremblay's Avatar
    Join Date
    Jul 2001
    Location
    Boston Area (North shore)
    Posts
    233
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I am running PWS Cold Fusion server and Cold fusion Studio and also MySql on the same laptop and all seems to be running fine.

    Give us some error messages and we can help you work it out.

    Kevin -- Digitalman
    Kevin Tremblay-- Sys Admin
    work: kevin_tremblay@hsgmed.com
    "The object of the journey is not to arrive."


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •