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

  1. #1

    Default MySQL and CF

    I'm using CF MX7 (developer version) with MySQL 4.1.1 on Windows.
    I have followed the instructions here: [url]http://www.macromedia.com/go/6ef0253[/url]
    to update the driver, but wonder if I have the syntax right.
    Would this be correct?
    jdbc:mysql://localhost:3306/gef
    ("gef" is the name of the mysql database)
    I'm still getting an error message when I try to connect to the database
    (sorry, don't have the message here).
    Some have suggested reverting to version 3.0.16 of the connector.
    Ideas?

    gefjo Guest

  2. Similar Questions and Discussions

    1. #40471 [NEW]: PHP 5.2.1 failed to be compiled with MySQl 5.0.33, MySQL 5.0.27, MySQL 5.1.15
      From: pcdinh at gmail dot com Operating system: CentOS 4.4 PHP version: 5.2.1 PHP Bug Type: Compile Failure Bug description:...
    2. #40207 [NEW]: Warning: mysql_connect() [function.mysql-connect]: Lost connection to MySQL ser
      From: arif at peshawaronline dot com Operating system: PHP version: 4.4.4 PHP Bug Type: Compile Warning Bug description: ...
    3. ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
      When i try to start my mysql server, i get this error ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock'...
    4. Seen this message? Can't connect to local MySQL server through socket '/tmp/mysql.sock'
      Seen this message? Can't connect to local MySQL server through socket '/tmp/mysql.sock' I got this trying to install DBI and DBD for mysql from...
    5. Seen this message? Can't connect to local MySQL server throughsocket '/tmp/mysql.sock'
      Allen Marshall wrote: I just saw it in another newsgroup. Don't multi-post! -- Gunnar Hjalmarsson Email:...
  3. #2

    Default Re: MySQL and CF

    On 2005-06-21 09:23:00 -0500, "gefjo" <webforumsuser@macromedia.com> said:
    > I'm using CF MX7 (developer version) with MySQL 4.1.1 on Windows.
    > I have followed the instructions here: [url]http://www.macromedia.com/go/6ef0253[/url]
    > to update the driver, but wonder if I have the syntax right.
    > Would this be correct?
    > jdbc:mysql://localhost:3306/gef
    > ("gef" is the name of the mysql database)
    > I'm still getting an error message when I try to connect to the
    > database (sorry, don't have the message here).
    > Some have suggested reverting to version 3.0.16 of the connector.
    > Ideas?
    The error message would be key--do you get a "driver not found" error
    or some error relating to not being able to connect? Also, try using
    127.0.0.1 instead of localhost just for kicks--if seen that do the
    trick in some cases.

    Matt
    --
    Matt Woodward
    [email]mpwoodward@gmail.com[/email]
    Team Macromedia - ColdFusion

    mpwoodward *TMM* Guest

  4. #3

    Default Re: MySQL and CF

    Thanks for the suggestion, Matt. I'll try the numeric address idea this
    evening. I am indeed getting a driver not found error. Last night I tried the
    idea some have suggested of installing a slightly older connector, but that
    didn't help.
    Is it true that the MySQL database has to be named all in caps? Mine is
    actually "gef" not "GEF".
    I'd be interested to know if there's any prospect of an update from
    Macromedia; I can't believe that they make it this hard for users of one of the
    world's most popular databases.

    gefjo Guest

  5. #4

    Default Re: MySQL and CF

    On 2005-06-22 07:51:27 -0500, "gefjo" <webforumsuser@macromedia.com> said:
    > Thanks for the suggestion, Matt. I'll try the numeric address idea this
    > evening. I am indeed getting a driver not found error. Last night I
    > tried the idea some have suggested of installing a slightly older
    > connector, but that didn't help.
    If you're getting a "no suitable driver" error then that doesn't have
    to do with the version, it has to do with the fact that it can't find
    the driver. Where did you put the driver? How did you install it? If
    you didn't put it in the CF lib directory, did you update your
    classpath with the name of the jar file? Did you try restarting CF?
    > Is it true that the MySQL database has to be named all in caps? Mine
    > is actually "gef" not "GEF".
    I don't believe the case matters; I always just have mine match what
    the case is in MySQL and haven't had any problems. As a general rule
    you don't want to use mixed case for database stuff--some database
    platforms just convert everything to all upper-case anyway. I use
    lowercase for everything and use _ to separate words as needed on the
    database side.
    > I'd be interested to know if there's any prospect of an update from
    > Macromedia; I can't believe that they make it this hard for users of
    > one of the world's most popular databases.
    This isn't a Macromedia issue, it's a MySQL driver distribution issue.
    I believe (based on what I've heard from New Atlanta on the BlueDragon
    side) that while the MySQL driver is free for you to download, MySQL
    started charging for other companies to distribute it with their
    products.

    This also isn't what I'd call difficult--once you get the driver path
    issue resolved it will likely work. Provide some details about how you
    installed the driver, where you put it, etc. and I'm sure we can get
    you up and running.

    Matt
    --
    Matt Woodward
    [email]mpwoodward@gmail.com[/email]
    Team Macromedia - ColdFusion

    mpwoodward *TMM* Guest

  6. #5

    Default Re: MySQL and CF

    I followed the instructions in the Macromedia knowledge base doc that I linked to in my original query, posting the jar file in the lib directory and restarted CF.
    jogef Guest

  7. #6

    Default Re: MySQL and CF

    On 2005-06-22 10:39:44 -0500, "jogef" <webforumsuser@macromedia.com> said:
    > I followed the instructions in the Macromedia knowledge base doc that I
    > linked to in my original query, posting the jar file in the lib
    > directory and restarted CF.
    The other thing you can try (other than the older driver as you
    mentioned, but I don't think that is going to help your driver not
    found error) is unjarring the jar file so you would see an actual "com"
    directory in your cflib directory. You shouldn't have to do this, but
    it might be worth a shot. Or, try putting the jar file somewhere else
    and explicitly pointing to the jar file in your CF classpath.

    If you're getting a "cannot connect" issue that's a different story,
    but if it can't even find the driver then something's up with the way
    you installed it or CF isn't seeing it for some reason. I've never had
    any issues with just dropping the jar into the CF lib path myself, but
    try putting it elsewhere and pointing to it and see if that makes any
    difference.

    Matt
    --
    Matt Woodward
    [email]mpwoodward@gmail.com[/email]
    Team Macromedia - ColdFusion

    mpwoodward *TMM* Guest

  8. #7

    Default Re: MySQL and CF

    I'm a novice, so unjarring jars and changing CF classpaths is beyond me at this
    stage, but I'll keep reading and see if I get there. If either of these are
    easy, I would welcome an explanation.
    Otherwise, thanks for your efforts to date.
    John

    jogef Guest

  9. #8

    Default Re: MySQL and CF

    On 2005-06-22 16:06:25 -0500, "jogef" <webforumsuser@macromedia.com> said:
    > I'm a novice, so unjarring jars and changing CF classpaths is beyond me
    > at this stage, but I'll keep reading and see if I get there. If either
    > of these are easy, I would welcome an explanation.
    > Otherwise, thanks for your efforts to date.
    > John
    OK, sorry--should have explained more earlier. :-) First thing I'd
    probably try is putting the MySQL driver jar file somewhere else (it
    can be anywhere really) and modifying your CF classpath to point to the
    jar file. To do this, put the jar file somewhere logical on your hard
    drive; it doesn't even have to be under the CF directory structure at
    all.

    Then log into your CF administrator, and unfortunately at this point
    I'm flying blind because all my CF installations are J2EE
    installations, so the admin is a bit different. I believe what you're
    looking for is the Java and JVM settings. On that screen you should
    see a classpath input box on the form. In that box, keep whatever is
    already in there but append (using a comma as the separator I believe;
    again my apologies for not having a standalone CF install handy) the
    full path to your MySQL driver jar file *including the name of the jar
    file itself*. So for example if you're on a Windows machine and you
    put this jar file in the directory C:\mysql_drivers, and for simplicity
    let's say the name of the jar file is mysql.jar, you would put this in
    your classpath:
    C:\mysql_drivers\mysql.jar

    Restart CF and see if it picks it up at that point. Try that first,
    and if that still doesn't work I can try walking you through unjarring
    the jar file.

    Matt
    --
    Matt Woodward
    [email]mpwoodward@gmail.com[/email]
    Team Macromedia - ColdFusion

    mpwoodward *TMM* Guest

  10. #9

    Default Re: MySQL and CF

    Matt,
    Thanks. I'll look into all of that. In the meantime I ironed out one or two
    problems, and I now have a different error message when I try to verify:
    Connection verification failed for data source: gef
    com.mysql.jdbc.CommunicationsException: Communications link failure due to
    underlying exception: ** BEGIN NESTED EXCEPTION ** java.net.SocketException
    MESSAGE: java.net.ConnectException: Connection refused: connect STACKTRACE:
    java.net.SocketException: java.net.ConnectException: Connection refused:
    connect at
    com.mysql.jdbc.StandardSocketFactory.connect(Stand ardSocketFactory.java:151) at
    com.mysql.jdbc.MysqlIO.(MysqlIO.java:280) at
    com.mysql.jdbc.Connection.createNewIO(Connection.j ava:1774) at
    com.mysql.jdbc.Connection.(Connection.java:437) at
    com.mysql.jdbc.NonRegisteringDriver.connect(NonReg isteringDriver.java:268) at
    coldfusion.server.j2ee.sql.pool.JDBCPool.createPhy sicalConnection(JDBCPool.java:
    562) at
    coldfusion.server.j2ee.sql.pool.ConnectionRunner$R unnableConnection.run(Connecti
    onRunner.java:67) at java.lang.Thread.run(Unknown Source) ** END NESTED
    EXCEPTION **
    The root cause was that: com.mysql.jdbc.CommunicationsException:
    Communications link failure due to underlying exception: ** BEGIN NESTED
    EXCEPTION ** java.net.SocketException MESSAGE: java.net.ConnectException:
    Connection refused: connect STACKTRACE: java.net.SocketException:
    java.net.ConnectException: Connection refused: connect at
    com.mysql.jdbc.StandardSocketFactory.connect(Stand ardSocketFactory.java:151) at
    com.mysql.jdbc.MysqlIO.(MysqlIO.java:280) at
    com.mysql.jdbc.Connection.createNewIO(Connection.j ava:1774) at
    com.mysql.jdbc.Connection.(Connection.java:437) at
    com.mysql.jdbc.NonRegisteringDriver.connect(NonReg isteringDriver.java:268) at
    coldfusion.server.j2ee.sql.pool.JDBCPool.createPhy sicalConnection(JDBCPool.java:
    562) at
    coldfusion.server.j2ee.sql.pool.ConnectionRunner$R unnableConnection.run(Connecti
    onRunner.java:67) at java.lang.Thread.run(Unknown Source) ** END NESTED
    EXCEPTION **
    I wonder what this reveals to you...
    John

    gefjo Guest

  11. #10

    Default Re: MySQL and CF

    On 2005-06-23 07:48:09 -0500, "gefjo" <webforumsuser@macromedia.com> said:
    > Matt,
    > Thanks. I'll look into all of that. In the meantime I ironed out one
    > or two problems, and I now have a different error message when I try to
    > verify:
    > Connection verification failed for data source: gef
    > com.mysql.jdbc.CommunicationsException: Communications link failure
    > due to underlying exception:
    Are you running a software firewall of any kind such as Zone Alarm or
    Norton Internet Security? Can you connect to MySQL from the command
    line tools?

    --
    Matt Woodward
    [email]mpwoodward@gmail.com[/email]
    Team Macromedia - ColdFusion

    mpwoodward *TMM* Guest

  12. #11

    Default Re: MySQL and CF

    No. I had Norton Firewall, but killed it off because it was so awful.
    I'm not sure what you mean by command line tools. I can only say that MySQL is
    working fine on its own and with the PHP admin tool.

    gefjo Guest

  13. #12

    Default Re: MySQL and CF

    On 2005-06-23 10:56:43 -0500, "gefjo" <webforumsuser@macromedia.com> said:
    > No. I had Norton Firewall, but killed it off because it was so awful.
    > I'm not sure what you mean by command line tools. I can only say that
    > MySQL is working fine on its own and with the PHP admin tool.
    Your "on its own" reference is probably what I meant--I was asking if
    you could log into the MySQL admin tool from a DOS prompt and use the
    database server that way. If either that or PHP works, then the
    database server is working. Just wanted to check the obvious first.

    It still sounds to me like a driver location issue so try a couple of
    the other things I've mentioned and let me know how it goes.

    Matt
    --
    Matt Woodward
    [email]mpwoodward@gmail.com[/email]
    Team Macromedia - ColdFusion

    mpwoodward *TMM* Guest

  14. #13

    Default Re: MySQL and CF

    I too am having this problem of connecting with MySQL 4.1.1 and CFMX7. I have
    followed your conversations looking for ways to resolve this issue. I did
    install the jar file in the appropriate WEB-INF/lib file, but still no success.
    Any help with this issue would be greatly appreciated.

    wombatJohn Guest

  15. #14

    Default Re: MySQL and CF

    Your datasource should look something like this:

    [url]http://www.fordwebs.com/examples/assets/images/mysql.jpg[/url]

    --
    Ken Ford
    PVII Support Team
    [url]http://www.projectseven.com[/url]
    Team Macromedia Volunteer - Dreamweaver
    Certified Dreamweaver MX 2004 Developer


    "wombatJohn" <webforumsuser@macromedia.com> wrote in message news:d9khjo$far$1@forums.macromedia.com...
    >I too am having this problem of connecting with MySQL 4.1.1 and CFMX7. I have
    > followed your conversations looking for ways to resolve this issue. I did
    > install the jar file in the appropriate WEB-INF/lib file, but still no success.
    > Any help with this issue would be greatly appreciated.
    >

    Ken Ford - *TMM* & PVII Guest

  16. #15

    Default Re: MySQL and CF

    On 2005-06-25 16:16:40 -0500, "wombatJohn" <webforumsuser@macromedia.com> said:
    > I too am having this problem of connecting with MySQL 4.1.1 and CFMX7.
    > I have followed your conversations looking for ways to resolve this
    > issue. I did install the jar file in the appropriate WEB-INF/lib file,
    > but still no success. Any help with this issue would be greatly
    > appreciated.
    As MUCH detail as you can give will help resolve this. I use MySQL
    with CFMX 7 all the time and haven't ever had a problem so as Ken
    showed, either provide a screenshot or specific details about
    everything you've done to try and get this working. Also, it's
    critical to know if you have any firewall or internet security software
    installed, if you can get into MySQL from the command line, if you've
    tried some of the other resolutions outlined here, what specific
    version of the driver you're using ...

    Matt
    --
    Matt Woodward
    [email]mpwoodward@gmail.com[/email]
    Team Macromedia - ColdFusion

    mpwoodward *TMM* Guest

  17. #16

    Default Re: MySQL and CF

    Ken, that is exactly what the doctor ordered. All my connection issue are now resolved. Thank you so much.

    John :D
    wombatJohn Guest

  18. #17

    Default Re: MySQL and CF

    This syntax is different from what I've tried so far, so I'll give it a go.
    Matt: I tried your proposals without success so far, but I think with this
    team effort we'll get there in the end.
    Thanks
    John

    gefjo 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