Cannot create a new DB Connection, error: Unknown Reason

I have been trying to establish a database connection and can't seem to get anything going.

I make a new connection and specify where my .jar for mysql drivers is. Insert the IP of the database and the login details. Once I hit 'test' a pop up appears saying that it cannot establish a connection but gives me "Unknown reasons" for the cause.


Is there some special way to a connection going?

4 comments
Comment actions Permalink

Please provide
exact version of the MySQL server you are connecting to
exact version driver version and
exact "JDBC URL" you are using to connect (replace login&pass with some garbage)

Also, use Help|Reveal log.. and look for any relevant error stacktraces

0
Comment actions Permalink

I am connecting to the latest version of MySQL.

I am using the mysql-connector-java-5.1.17-bin.jar as the connector

with com.mysql.jdbc.Driver

hmmm forgive me for now begining to sound like a newbe in this. But i just realized that i may be using the wrong URL.

I was under the impression that just using the IP of the server running the MySQL databse would be enough.

What is the syntax to specify a valid URL?

I am inserting

URL: ip
login: user
pass: pass


and the log shows too many error from jetbrains but non related to a connection using db connections or anything related.

0
Comment actions Permalink

"latest version of MySQL" is definitely not a "exact version".

The syntax for JDBC URL is database-specific and is templates are available in its dropdown after you select correct driver class.

Screen Shot 2011-09-19 at 10.05.32 .png

0
Comment actions Permalink

Your right, I'm sorry for giving such a lazy response.

My server version is 5.1.58.

but thank you for your example, I was able to make a successful connection =)

0

Please sign in to leave a comment.