Ask a Question related to Coldfusion Database Access, Design and Development.
-
punjab4833 #1
Can't connect to MySQL [ColdFusion MX 7] on Linux
I'm running a linux server (Ubuntu 5.10), and have successfully installed the
developer's version of ColdFusion MX 7. It's correctly installed ( I can
login to the administrator ok), but I can't connect to my localhost MySQL
database. I get the following error:
------
Connection verification failed for data source: ******
java.sql.SQLException: Timed out trying to establish connection
The root cause was that: java.sql.SQLException: Timed out trying to establish
connection
-------
I found some instructions that said to manually make sure the proper Connector
class was installed. I installed the newest MySQL Connector/J in
/usr/local/addons on my server.
The full path to it reads:
/usr/local/addons/mysql-connector-java-3.1.11
The instructions I had found said to put the .jar file from the above
mysql-connector folder into the /lib directory of the ColdFusion folder. So I
put
mysql-connector-java-3.1.11-bin.jar into the ColdFusion folder. I then also
clicked on the "Java and JVM" section in the ColdFusion administrator, and put
this in the "ColdFusion Class Path" section:
/opt/coldfusionmx7/lib/mysql-connector-java-3.1.11-bin.jar
I restarted the server, but I still get the same error. Does anyone have any
experience manually installing an appropriate JDBC Connector for ColdFusion on
Ubuntu? Any help would be appreciated. Thanks.
punjab4833 Guest
-
#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'... -
Cannot connect to SQL 2k from MX7 (Linux)
Can someone confirm|deny that MX7 JDBC drivers fail to connect to a SQL 2k *SP4* server when the "force protocol encryption" is enabled? Same is... -
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:... -
Neculai Macarie #2
Re: Can't connect to MySQL [ColdFusion MX 7] on Linux
punjab4833 wrote:
Is your MySQL server running ? Do you have a firewall on the machine ?> I'm running a linux server (Ubuntu 5.10), and have successfully
> installed the developer's version of ColdFusion MX 7. It's
> correctly installed ( I can login to the administrator ok), but I
> can't connect to my localhost MySQL database. I get the following
> error: ------
> Connection verification failed for data source: ******
> java.sql.SQLException: Timed out trying to establish connection
> The root cause was that: java.sql.SQLException: Timed out trying to
> establish connection
> -------
Can you connect using telnet (telnet localhost 3306) ? If yes, can you
connect using mysql -u #your_user# -p #your_database# ?
--
<mack />
Neculai Macarie Guest
-
punjab4833 #3
Re: Can't connect to MySQL [ColdFusion MX 7] on Linux
Yes, the server is running. I have other applications (i.e., PHP) successfully
talking to the database. I can login with the username I'm supplying it. As
far as I can tell, the error appears to be something with ColdFusion not
properly using (or maybe even finding) the jdbc driver.
Anyone have any experience installing the jdbc connector manually? Is all I
have to do put the jar in the ColdFusion folder and in it's classpath, or do I
have to actually extract out the classes too? Please help, this is driving me
crazy.
punjab4833 Guest
-
BKBK #4
Re: Can't connect to MySQL [ColdFusion MX 7] on Linux
What happens when you add this, instead, to your classpath:
/usr/local/addons/mysql-connector-java-3.1.11
BKBK Guest
-
punjab4833 #5
Re: Can't connect to MySQL [ColdFusion MX 7] on Linux
I tried what you suggested BKBK, but still no dice. As to what Neculai
suggested, maybe that is the problem...
When I tried to do 'telnet localhost 3306' this what happens:
-----
Trying 127.0.0.1...
Connected to localhost.localdomain.
Escape character is '^]'.
NHost 'localhost.localdomain' is not allowed to connect to this MySQL
serverConnection closed by foreign host.
-----
Any thoughts?
punjab4833 Guest
-
punjab4833 #6
Re: Can't connect to MySQL [ColdFusion MX 7] on Linux
The host in the MySQL table is always localhost. Is that the problem? Does the driver try to connect to 'localhost.localdomain' by default?
punjab4833 Guest
-
BKBK #7
Re: Can't connect to MySQL [ColdFusion MX 7] on Linux
The host in the MySQL table is always localhost. Is that the problem?
Does the driver try to connect to 'localhost.localdomain' by default?
No, it tries to connect to the values that you entered for the settings
Server Host and Port when you configured MySQL. They should
be 127.0.0.1 and 3306 respectively.
BKBK Guest
-
Neculai Macarie #8
Re: Can't connect to MySQL [ColdFusion MX 7] on Linux
punjab4833 wrote:
I think that the driver is properly installed (otherwise the error would> Yes, the server is running. I have other applications (i.e., PHP)
> successfully talking to the database. I can login with the username
> I'm supplying it. As far as I can tell, the error appears to be
> something with ColdFusion not properly using (or maybe even finding)
> the jdbc driver.
have said something about not finding the driver). Can you double check the
parameters you entered in the admin area (and see if MySQL is really
listening on the IP that you specified ) ?
You could try putting the jar file in $CF_HOME/runtime/servers/lib/ and> Anyone have any experience installing the jdbc connector manually?
> Is all I have to do put the jar in the ColdFusion folder and in it's
> classpath, or do I have to actually extract out the classes too?
> Please help, this is driving me crazy.
restarting CF. Then use the "Other" datasource type to create your
datasource.
--
<mack />
Neculai Macarie Guest
-
fou99004 #9
Re: Can't connect to MySQL [ColdFusion MX 7] on Linux
I'm using a pc, but I had the same problem and I think it should work for you.
The problem is that you are putting the file in the wrong lib. the lib should
be the one in wwwroot/WEB-INF/lib/ and then your file.
CF Data Source Name : db(example)
JDBC URL: jdbc:mysql:/127.0.0.1:3306/db
Driver Class: com.mysql.jdbc.Driver
This is case sensitive when you are creating your datasource in coldfusion.
Make sure that you are selecting other as your driver. Hope this helps.
fou99004 Guest
-
punjab4833 #10
Re: Can't connect to MySQL [ColdFusion MX 7] on Linux
Thanks, I got it working now. I think the problem is that I was putting in the
JDBC URL as: jdbc:mysql://localhost:3306/db
The extra forward slash after the mysql: did it I guess..? Thanks again to
all who replied.
punjab4833 Guest
-
prasadvishnu #11
Re: Can't connect to MySQL [ColdFusion MX 7] on Linux
Hi
can u tell me the steps to be followed to install Coldfusion MX 7 on ubuntu
prasadvishnu Guest



Reply With Quote

