thanks in advance
I have a cpanel host and I have created a MySQL database on it.
I was trying to connect to MySQL via IntelliJ Idea... for using it in Spring boot and etc but all the time I try I get connection fail error:
Connection to taxirkar_nettodb#109.169.71.144 failed.
[08S01] Communications link failure.
The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
I'm getting my host IP from my cpanel host by going to "server information" and grabbing the shared IP
I have created a DB in Cpanel with name of : "nettodb".
I have assigned a user with name of "tara" to it.
the host is : "taxirkaran.com".
And my host username is : "taxirkar".
what else should i do? what I'm doing wrong?
there is the picture of my settings in intelli :
https://drive.google.com/file/d/1xJO-cRb139jq71K48aWnYpZQY4mdtl_2/view?usp=sharing
Related
I am new to RDS, this is the first time i'm trying to connect MySQL Workbench to a remote DBMS so i'm not sure where is the problem.
What i want to do : connect workbench to rds so i can add manually data to my database ( i would prefer to do it with a GUI )
PS :
Useful informations : The RDS database was created by Elastic Beanstalk from a jar file (spring boot) i uploaded.
What is the problem : workbench can't connect to rds and tells me "unable to connect to localhost" when it is clearly a remote server.
The error message returned after a test connection
What i tried to fix the issue :
Check the connection informations : all of them are correct : i am using TCP/IP connection
Check the accessibility : the server is public
Edit Inbound rules : the server is accepting all incoming requests
Try other GUI : DBeaver faailed with this error : " Communications link failure
The last packet sent successfully to the server was 0 milliseconds ago. The driver has not
received any packets from the server. " : unknown host
What i want to know :
What can cause this issue ? Why is Workbench refering to my server as localhost when it is not ? Is there any logging system for RDS/Workbench i can use for further investigations ?
Is there any alternatives for my need ?
Thank you for your help !
I just connected to my RDS instance using MySQL workbench.
Your issue sounds like an inbound rule issue. To rule that out, double check your rule that lets all traffic in. Once you determine that is the cause, you can change it.
Also, make sure that you specify the endpoint in your login screen and have correctly set the password and user name.
Thank you for your answer smac2020!
I do think you are right! I tried to connect to the database with SSH connection to my EC2 instance and it worked.
Conclusion : i can access the db from inside my vpc but not from the outside despite the db is public and the inbound are correct (i think they are).
I'm trying to figure out what the issue may be, i will post if i succeed in correcting it.
Note for people trying to access using SSH (and myself for later) :
there are the tutos i used to connect workbench :
Add the SSH pairs : https://www.youtube.com/watch?v=G4SXNHuGM8A
Connect to db with SSH over EC2 : https://www.youtube.com/watch?v=gM7JvNMOUQM
I am trying to connect to my remote MySQL database which is on the server, in my application.properties I have following config
spring.jpa.hibernate.ddl-auto=create
spring.datasource.url=jdbc:mysql://www.mydomain.com:3306/my_database_name
spring.datasource.username=my_username
spring.datasource.password=my_password
But i get this error
com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
Can anyone please tell me what am i doing wrong ?
Make sure remote connection is enabled on MySQL server ( Try connecting from workbench or other sql client from your local machine with above username and password to test if remote connection is active. Activate if not active
Make sure port 3306 is open on server ( in firewall of server)
Make sure domain is getting resolved correctly ( ping www.my_domain.com
I created a MySQL RDS instance at AWS(Amazon web services).When I tried to test connection(Database) during the "Jira" installation, I am facing the below issue:
Error connecting to database
Communications link failure The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
Connection timed out: connect
when I tried to connect through MySQL localhost I am facing the below issue:
Error connecting to database
Unknown system variable 'storage_engine'
Try to remove 'storage_engine' variable from db url in /var/atlassian/application-data/jira/dbconfig.xml.
New mysql does not support this parameter as it is default engine now.
I'm trying to connect mysql db in openshift from my application as below ,
new DriverManagerDataSource("jdbc:mysql://localhost/dbXXXX?autoReconnect=true", "usernameXXX", "pwdXXX");
However an error was thrown as
om.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
Any idea , whats the reasonn
If this is a scaled application, then you need to also supply the port, as it won't be 3306. Otherwise try restarting the mysql cartridge, or try sshing into your gear, and use the "mysql" command to see if you can connect, also try using the environment variables for your connection instead of the actual values. Also, localhost is wrong, ssh into your gear and run "env | grep MYSQL" and you will see the values that you should use.
i can't access my website mysql db from sqldeveloper.
in cpanel there is an option (Remote Database Access Hosts) which allows one to add IP addresses that can access the db. I have entered my ip address and i have used the % wildcard.
so for instance if my ip address was 12.34.56.78, i have entered my ip address as:
1 - 12.34.56.78
2 - 12.34.56.%
3 - 12.%.%.%
in sqldeveloper i have downloaded and added the mysql third party jdbc driver .jar file (mysql-connector-java-5.1.13-bin.jar).
i have the right user name, password, hostname and port.
so, if my website domain was called www.mysite.com and my username was user, the username i would use in sqldeveloper would be mysite_user.
and the hostname would be www.mysite.com.
the port i am told via cpanel is 3307.
i bow to any superior knowledge if my assumptions are incorrect.
any help would be appreciated
-- edit --
oh yeah, the error message I get (pretty important!) in sqldeveloper is
Status : Failure - Test failed: Communications link failureThe last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
-- end edit --
I do the same via cPanel but after i connect to my host via SqlYog community edition...
Uniqe differce is the port, i use the standard 3306 port instead a custom port.
Try if it connect: http://code.google.com/p/sqlyog/
It turns out that i did need to use port 3306 but more importantly, my web host needed to make a change on their firewall.
i managed to connect using mysite.com, username, password and port 3306.
thanks #Achilleterzo for your help in the meantime