Islam Ismayilov
Islam Ismayilov

Reputation: 113

Connection error to database in cloud

I have problem context xml file.

I have wrote below mentioned code but, i couldn't connect to database:

Resource name = "jdbc/Examsite" auth="Container" 
                type="javax.sql.DataSource"  maxActive="20" maxIdle="30"  
                maxWait="10000" driverClassName="com.mysql.jdbc.Driver" 
                url=" jdbc:mysql://http://34.209.206.56:3306/oracle_exam_last " 
                username="****" password="****" />

Upvotes: 1

Views: 32

Answers (1)

Youcef LAIDANI
Youcef LAIDANI

Reputation: 59986

You have a problem in your URL :

url=" jdbc:mysql://http://34.209.206.56:3306/oracle_exam_last " 
//------------------^^^--------------------------------------^

You should not specify the protocole http just the ip and the port number and the database name, also don't make a space in your url :

url=" jdbc:mysql://34.209.206.56:3306/oracle_exam_last" 

Upvotes: 1

Related Questions