Ask a Question related to Coldfusion Database Access, Design and Development.
-
gefjo #1
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
-
#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:... -
#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: ... -
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'... -
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... -
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:... -
mpwoodward *TMM* #2
Re: MySQL and CF
On 2005-06-21 09:23:00 -0500, "gefjo" <webforumsuser@macromedia.com> said:
The error message would be key--do you get a "driver not found" error> 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?
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
-
gefjo #3
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
-
mpwoodward *TMM* #4
Re: MySQL and CF
On 2005-06-22 07:51:27 -0500, "gefjo" <webforumsuser@macromedia.com> said:
If you're getting a "no suitable driver" error then that doesn't have> 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.
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?
I don't believe the case matters; I always just have mine match what> Is it true that the MySQL database has to be named all in caps? Mine
> is actually "gef" not "GEF".
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.
This isn't a Macromedia issue, it's a MySQL driver distribution issue.> 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.
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
-
jogef #5
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
-
mpwoodward *TMM* #6
Re: MySQL and CF
On 2005-06-22 10:39:44 -0500, "jogef" <webforumsuser@macromedia.com> said:
The other thing you can try (other than the older driver as you> 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.
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
-
jogef #7
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
-
mpwoodward *TMM* #8
Re: MySQL and CF
On 2005-06-22 16:06:25 -0500, "jogef" <webforumsuser@macromedia.com> said:
OK, sorry--should have explained more earlier. :-) First thing I'd> 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
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
-
gefjo #9
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
-
mpwoodward *TMM* #10
Re: MySQL and CF
On 2005-06-23 07:48:09 -0500, "gefjo" <webforumsuser@macromedia.com> said:
Are you running a software firewall of any kind such as Zone Alarm or> 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:
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
-
gefjo #11
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
-
mpwoodward *TMM* #12
Re: MySQL and CF
On 2005-06-23 10:56:43 -0500, "gefjo" <webforumsuser@macromedia.com> said:
Your "on its own" reference is probably what I meant--I was asking if> 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.
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
-
wombatJohn #13
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
-
Ken Ford - *TMM* & PVII #14
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
-
mpwoodward *TMM* #15
Re: MySQL and CF
On 2005-06-25 16:16:40 -0500, "wombatJohn" <webforumsuser@macromedia.com> said:
As MUCH detail as you can give will help resolve this. I use MySQL> 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.
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
-
wombatJohn #16
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
-
gefjo #17
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



Reply With Quote

