How to connect to MySql from Cold Fusion

Ask a Question related to Coldfusion Database Access, Design and Development.

  1. #1

    Default How to connect to MySql from Cold Fusion

    If I install Mysql either from their web site or by using WAMP. How do I
    connect to a MySQL database from the Cold Fusion Administrator?

    I am using a development editon using the "Server Edition" of Cold Fusion, and
    I used the built in web server.

    ked50 Guest

  2. Similar Questions and Discussions

    1. Migrating from Cold fusion 5 to Cold fusion 7
      Hi, I am facing problem while migrating from CF 5 to CF 7. Please let me know is there any tool is available to Migrate from CF5 to CF 7.
    2. Cold Fusion / MySQL development setup NIGHTMARE!
      Please, somebody, anybody.. I have tried many possible combinations of MySQL Server and the J connector. Nothing works. I have two DSN that I've...
    3. mySQL Drivers and Cold Fusion 6.1
      Hello all, I have scoured the forums for some answers to the following problem: We are trying to install the latest mySQL drivers into Windows...
    4. Cannot connect SQL2000 Server Database to Cold Fusion
      Hello I have a problem connecting my SQL2000 Server Database to my Macromedia ColdFusion MX in the ColdFusion MX Administrator section: Data &...
    5. Cannot Connect SQL 2000 Database to Cold Fusion
      Hello I have a problem connecting my SQL2000 Server Database to my Macromedia ColdFusion MX in the ColdFusion MX Administrator section: Data &...
  3. #2

    Default Re: How to connect to MySql from Cold Fusion

    The way I did it was to download the ODBC driver for mysql from
    [url]http://www.mysql.com/products/connector/odbc/[/url]

    Then I created a datasource to my mysql database in Windows (Control Panel ->
    Administrative Tools -> Data Sources ODBC)

    Then in the ColdFusion Adminisrator under Data Sources add a new datasource
    with the same name you gave the connection above, and select drive type as
    "ODBC Socket".

    There is also probably a way to do it using the MySQL JDBC driver but I have
    found the above satisfactory for developing on my PC

    am2605 Guest

  4. #3

    Default Re: How to connect to MySql from Cold Fusion

    I spent a lot of time reading forums and articles (mostly at home) to make this
    work, but CF now recognizes my MySQL database. Now the hard part to make the
    program work with the MySQL data instead of MS Access.

    I am using a PC with Windows XP, ColdFusion MX 6.1, MySQL 4.1 Server,
    DreamWeaver MX installed.
    Also works with a PC with Windows XP, ColdFusion MX 7.1, MySQL 4.1 Server, DW
    8.
    The MySQL Database is now recognized as a Data Source in CF MX 6.1 or CF MX 7x.
    1. Downloaded the mysql-connector-java-3.0.17- version of MySQL Connector/J
    from the MySQL download site.
    Extracted the JDBC driver JAR file: mysql-connector-java-3.0.17-ga-bin.jar and
    copied it to the C:\CFusionMX\wwwroot\WEB-INF\lib folder.
    2. In the ColdFusion Administrator, clicked on the "Java and JVM" page.
    Entered the full path to the JAR file in the Class Path field:
    C:\CFusionMX\wwwroot\WEB-INF\lib\mysql-connector-java-3.0.17-ga-bin.jar,
    Note: It says to use a comma (,) to separate class paths when this field
    contains multiple values. (Cold Fusion adds a comma at the end in CF MX 6.1.
    3. Then I used the ColdFusion Administrator Data Sources page to add a new
    data source for the MySQL Connector:
    I named the data source MyDS and chose 'Other' for the Driver before pressing
    the Add button. Then I set the following parameters:
    JDBC URL: jdbc:mysql://localhost:3306/mydatabase
    Driver Class: com.mysql.jdbc.Driver
    Driver Name: MySQL Connector/J
    Username: myuname
    Password:
    Note: I previously installed MYSQL 4.1 Server. I used MySQL Administrator to
    set up a user named myuname with all access to the MySQL mydatabase located in
    C:\Program Files\MySQL\MySQL Server 4.1\data folder and tested it by logging in
    with MySQL Browser and executing a select command.
    The Username and Password I put in above is for the MySQL username and
    password that I created in MySQL Administrator.
    I clicked Submit to apply the changes:
    It now verifies the Data Source for MySQL database.


    rr008 Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139