Connecting to MySQL 5.0, How?

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

  1. #1

    Default Connecting to MySQL 5.0, How?

    Hi,

    I run everything on my local machine that is WIN XP SP2 with IIS, Coldfusion
    MX7.0
    I just installed MySQL5.0, the service is running and can be reached with
    MySQL-client.

    I'm trying to set up a new datasource to the MySQL test-database and used the
    following guidelines for it:
    [url]http://www.macromedia.com/cfusion/knowledgebase/index.cfm?id=6ef0253[/url]

    Basicaly this is what it says :

    1.Download a current, stable version of the MySQL Connector J JDBC driver,
    available at: [url]http://dev.mysql.com/doc/connector/j/en/index.html[/url]
    2.Extract the mysql-connector-java-3.{n}-bin.jar file from the downloaded
    archive file.
    3.Save the mysql-connector-java-3.{n}-bin.jar file in the cf_root/WEB-INF/lib
    directory.
    4.Restart the ColdFusion MX server.
    5.Add a new data source to the ColdFusion MX Administrator, using the driver
    option Other.
    Enter the JDBC URL:
    jdbc:mysql://[host]:[port]/[database]
    6.Enter the Driver Class:
    com.mysql.jdbc.Driver
    7.Complete username/password, and adjust other data source settings, if
    needed.
    8.Submit the data source for verification.

    This technote is meant for connecting to a MySQL 4.1 and not 5.0.
    So the first question should be if this technote is relevant or not.
    If not, where can I find more info or can anybody help me?

    If it is relevant and also (I think) in all other cases : What is the
    port-number through witch I can reach de MySQL-service?

    Thx




    feiloiram Guest

  2. Similar Questions and Discussions

    1. problem connecting from cf 6.0 to mysql 5
      Hey guys, Heres my problem I can't connect to mysql after i upgraded to v5 it says: Connection verification failed for data source: eval...
    2. Connecting to MySql
      I have installed MySql on a Windows 98 workstation. I start the service with the command: mysqld I can connect to the database and see tables,...
    3. Connecting with MySQL
      How I do to connect the ColdFusion with MySQL? I read http://www.macromedia.com/cfusion/knowledgebase/index.cfm?id=6ef0253 page, but it doesn't works...
    4. Connecting to MySQL 4.1
      OK I am trying to create a DSN for a MySQL db. I have followed this tech note:- ...
    5. connecting mysql
      im having trouble viewing any results from my db, ive recently switched to a mac and have it all running locally, i have no trouble accessing the...
  3. #2

    Default Re: Connecting to MySQL 5.0, How?

    Its me again,

    The problem is solved.
    I post this answer so nobody wastes time on answering it and also that
    everybody knows that the above mentioned Knowledge-page is indeed relevant for
    CFMW7.0 en MySQL5.0

    I checked were my ...jar -file was and it wasn't in the lib-directory. When I
    moved it to that folder I forgot to restart my CF-service.

    See you

    feiloiram Guest

  4. #3

    Default Re: Connecting to MySQL 5.0, How?

    feiloiram wrote:
    > Its me again,
    >
    > The problem is solved.
    > I post this answer so nobody wastes time on answering it and also that
    > everybody knows that the above mentioned Knowledge-page is indeed relevant for
    > CFMW7.0 en MySQL5.0
    >
    > I checked were my ...jar -file was and it wasn't in the lib-directory. When I
    > moved it to that folder I forgot to restart my CF-service.
    >
    > See you
    >
    Great to hear you got this resolved. As an aside, you can use this same
    method to connect to more or less *any* database that has a JDBC driver
    available.

    Matt

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

  5. #4

    Default Re: Connecting to MySQL 5.0, How?

    >As an aside, you can use this same method to connect to more or less *any*
    database that has a JDBC driver available.

    Matt,

    Thanks, that is a good point. Do you know if you connect to "remote"
    databases using this method? I have not had a chance to test it, but I would
    think you can using the remote server address in the jdbc url.





    mxstu Guest

  6. #5

    Default Re: Connecting to MySQL 5.0, How?

    mxstu, you're just connecting to another database. It doesn't make any
    difference if it's on your local machine or on a separate (remote) machine, you
    use the same connection string using the database server's IP address or URL.
    The only thing that will keep you from connecting to a remote db is if the db
    server only allows the db user to connect from a specific IP address.

    cf_menace Guest

  7. #6

    Default Re: Connecting to MySQL 5.0, How?

    cf_menace,

    That was pretty much what I was thinking. A jdbc url is still a url.. whether
    it is for a local or remote machine, but not having tried it myself, I just
    wanted confirmation ;-) Thanks.

    So what has your experience been with datasources for remote databases? Any
    issues or is it pretty much the same as local datasources?

    mxstu Guest

  8. #7

    Default Re: Connecting to MySQL 5.0, How?

    mxstu wrote:
    >>As an aside, you can use this same method to connect to more or less *any*
    >
    > database that has a JDBC driver available.
    >
    > Matt,
    >
    > Thanks, that is a good point. Do you know if you connect to "remote"
    > databases using this method? I have not had a chance to test it, but I would
    > think you can using the remote server address in the jdbc url.
    Absolutely--as long as the CF server can "see" the database server (in
    other words, the db server is available over the network, the right
    ports are open, etc.) you can connect to it. It doesn't care whether
    it's local or remote.

    Matt

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

  9. #8

    Default Re: Connecting to MySQL 5.0, How?

    Great! Thanks Matt.
    mxstu 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