Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Connecting to MySQL

New Here ,
May 20, 2008 May 20, 2008
I am trying to connect to MySQL (I just downloaded and implemented it). In the past, I have only used Access and SQL. I cannot seem to connect. Can someone point me in the right direction please?

Here is the message I am receiving...

Connection verification failed for data source: farcry
com.mysql.jdbc.CommunicationsException: Communications link failure due to underlying exception: ** BEGIN NESTED EXCEPTION ** java.net.UnknownHostException MESSAGE: (local) STACKTRACE: java.net.UnknownHostException: (local) at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method) at java.net.InetAddress$1.lookupAllHostAddr(InetAddress.java:849) at java.net.InetAddress.getAddressFromNameService(InetAddress.java:1200) at java.net.InetAddress.getAllByName0(InetAddress.java:1153) at java.net.InetAddress.getAllByName(InetAddress.java:1083) at java.net.InetAddress.getAllByName(InetAddress.java:1019) at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:163) at com.mysql.jdbc.MysqlIO.(MysqlIO.java:267) at com.mysql.jdbc.Connection.createNewIO(Connection.java:2739) at com.mysql.jdbc.Connection.(Connection.java:1553) at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:266) at coldfusion.server.j2ee.sql.pool.JDBCPool.createPhysicalConnection(JDBCPool.java:589) at coldfusion.server.j2ee.sql.pool.ConnectionRunner$RunnableConnection.run(ConnectionRunner.java:67) at java.lang.Thread.run(Thread.java:619) ** END NESTED EXCEPTION ** Last packet sent to the server was 0 ms ago.
The root cause was that: com.mysql.jdbc.CommunicationsException: Communications link failure due to underlying exception: ** BEGIN NESTED EXCEPTION ** java.net.UnknownHostException MESSAGE: (local) STACKTRACE: java.net.UnknownHostException: (local) at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method) at java.net.InetAddress$1.lookupAllHostAddr(InetAddress.java:849) at java.net.InetAddress.getAddressFromNameService(InetAddress.java:1200) at java.net.InetAddress.getAllByName0(InetAddress.java:1153) at java.net.InetAddress.getAllByName(InetAddress.java:1083) at java.net.InetAddress.getAllByName(InetAddress.java:1019) at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:163) at com.mysql.jdbc.MysqlIO.(MysqlIO.java:267) at com.mysql.jdbc.Connection.createNewIO(Connection.java:2739) at com.mysql.jdbc.Connection.(Connection.java:1553) at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:266) at coldfusion.server.j2ee.sql.pool.JDBCPool.createPhysical...
TOPICS
Database access
1.5K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 21, 2008 May 21, 2008
which cf version?
which mysql version?
what are your connection setting for the dsn in cf admin?

Azadi Saryev
Sabai-dee.com
http://www.sabai-dee.com/
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 21, 2008 May 21, 2008
CF8 & MySQL 5.1...as far as the connection settings...that is what I am wondering about.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 21, 2008 May 21, 2008
fs22 wrote:
> Connection verification failed for data source: farcry
> com.mysql.jdbc.CommunicationsException: Communications link failure due to
> underlying exception: ** BEGIN NESTED EXCEPTION **
> java.net.UnknownHostException MESSAGE: (local) STACKTRACE:
> java.net.UnknownHostException: (local) at

"local" is not a valid hostname for the MySQL server. Use a FQDN or an
IP address.

Jochem

--
Jochem van Dieten
Adobe Community Expert for ColdFusion
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 21, 2008 May 21, 2008
I installed MySQL locally on my C drive...are you saying that I simply need to provide the folder location such as C:\Program Files\MySQL?
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 22, 2008 May 22, 2008
fs22 wrote:
> I installed MySQL locally on my C drive...are you saying that I simply need to provide the folder location such as C:\Program Files\MySQL?

A folder location is not a FQDN or an IP address. Just enter 127.0.0.1.

Jochem

--
Jochem van Dieten
Adobe Community Expert for ColdFusion
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 22, 2008 May 22, 2008
Thanks...did that and received the following error...

Connection verification failed for data source: farcry
java.sql.SQLException: Access denied for user ''@'localhost' (using password: NO)
The root cause was that: java.sql.SQLException: Access denied for user ''@'localhost' (using password: NO)
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 22, 2008 May 22, 2008
fs22 wrote:
> Connection verification failed for data source: farcry
> java.sql.SQLException: Access denied for user ''@'localhost' (using password:
> NO)

So fill in the username and password.

Jochem


--
Jochem van Dieten
Adobe Community Expert for ColdFusion
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 22, 2008 May 22, 2008
When I installed MySQL, I did not specify a user name and password.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 22, 2008 May 22, 2008
fs22 wrote:
> When I installed MySQL, I did not specify a user name and password.

Then you should fix that first and then specify them in CF.

Jochem

--
Jochem van Dieten
Adobe Community Expert for ColdFusion
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 22, 2008 May 22, 2008
it looks like your mysql installation is not fully configured...
you MUST provide a username and password at install. the default
username, iirc, is root, ut i think you have to specify a password for
it at install....

mysql by default installs on localhost with port 3306 - use that in your
cf dsn connection setup (those are defaults there as well).

Azadi Saryev
Sabai-dee.com
http://www.sabai-dee.com/
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
May 22, 2008 May 22, 2008
LATEST
Also make sure to grant proper access to the root user or any other user you want to use. Mysql does not seem to provide proper permissions to the root user also.

HTH,
Swathi.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources