I wanted to use Hibernate, so I created a MySQL datasource by database of IntelliJ IDEA. But I got a problem that "connection to MySQL" failed.
I did not change any default setting and just added "demo" as database name.
Here is the description of the problem returned by IntelliJ IDEA.
Connection to MySQL - demo#localhost failed.
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.
(4s)
Sorry but there is no further information about the problem.
I granted IntelliJ IDEA the permission to access Internet since I can download packages via Maven dependencies, so probably there is not any problem with my Internet.
Related
I've added the host URL ({hash}.rackspaceclouddb.com), port 3306, and I'm using the same user and password that has access to everything via PhpMyAdmin, but I'm getting a failure when I test the connection. I understand that they run their instances on a private network, which I'm sure is causing the difficulty. Is there some trick I'm not aware of, or is it not possible?
Error message:
Failed: Communications link failure. The driver has not received any packets from the server.
In earlier versions, we've had a similar issue when establishing a connection with MySql. Please update DataGrip to the latest version. Also, make sure to download the latest MySql driver version available in DataGrip.
Since this morning we're experiencing some problems in our Google Datastudio reports, connected through the MySQL connector. We are running MySQL8 through SSL and have not had any problems before. Unfortunately this morning some diagrams showed an error:
Unable to connect 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.
It appears to be random what diagrams will get the error. When I try to refresh the data for a specific diagram by, for example, changing the date, it works again. Also, manually refreshing the report results in random broken diagrams.
Connections etc are all tested with external tools and seem to work fine.
Hope anyone can help me.
some users complains similar issue for few days on community forum
There is no status page that can confirm this and there is no channel support existing for GDS
https://support.google.com/datastudio/threads?hl=en&thread_filter=(category%3Aconnect_to_data)&max_results=20
I am running a Minecraft server which is querying a SQL database on the same VPS as the game server for various bits of data (ranks, warps and such). Today have encountered something which has stumped me and I am turning to you hoping for an answer.
My VPS is running Ubuntu Server 18.04.4 LTS, the Minecraft server is being ran from within a screen instance and no changes to the server, operating system or mySQL that I am aware of have been made that could have caused an issue and given I am the only one with SSH access to the server theres no way an update could have been made unless it was silently updated in the background without my knowledge. The problem just randomly happened out of nowhere.
The specific error I am getting (output from MC server console)
2021-05-19 12:44:51 [INFO] [STDOUT] [SERVERMANAGER EXCEPTION | com.mysql.cj.jdbc.exceptions.CommunicationsException] Communications link failure
2021-05-19 12:44:51 [INFO] [STDOUT] The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
Granted I have little experience with SQL (I inherited this SQL setup from someone else who I am unable to contact for assistance to fix this) but the last message of this error lead me to believe that everything with the Minecraft server itself was fine and the SQL database simply was not acknowledging the packets the Minecraft server was sending.
However despite...
Restarting the mySQL service with sudo service mysql restart
Verifying that the servermanager database I am using is still present with SHOW DATABASES;
Verifying that the three tables servermanager has are still present with SHOW TABLES;
Restarting the VPS
I cannot for the life of me seem to get this issue to fix itself!
Anyone able to offer any insight?
I'm working on a PHP project using PhpStorm + DataGrip + MySQL + WAMP and since then was working normally with remote database with these configurations (see images):
but suddenly I'm getting this error:
[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. java.net.ConnectException: Connection refused: connect
Could someone knows what can I do to solve this error?
I already tried to do what I found here (Solving a "communications link failure" with JDBC and MySQL) and that did not work yet.
I expect to connect again normally to my database.
Hi this error is because you are running a MySQL version 5 or 8.0 and later. And your server is configured to use the protocol of TLS 1.2. So, you need to enable TLS Protocols.
Open Datagrip
Go to Properties
Data Sources > Advanced
In enabledTLSProtocol set the value:
TLSv1,TLSv1.1,TLSv1.2,TLSv1.3
Test connection. And should work!
edit the JDBC url and append this query parameter &enabledTLSProtocols=TLSv1.2
I'm facing a perplexing problem. I've completed a jsf web app that utlizes hibernate and infinispan with Tomcat7 and tomcat-jdbc-pool as the connection pool provider.
It is being deployed to a Linode cluster w/ 2 nodes -- one database server and one production server.
I can run the app on my local environment using the exact same copy of Tomcat7 (I literally tarred the tomcat directory and promoted it to the server to debug this error) -- even when connected to the live database instance. Everything runs fine.
When I attempt to run the application from the production server I get a MySQLIO error:
Caused by: java.net.ConnectException:
Connection refused
Looking further up in the logs i see:
The last packet sent successfully to
the server was 1 milliseconds ago. The
driver has not received any packets
from the server.
com.mysql.jdbc.exceptions.jdbc4.CommunicationsException:
Communications link failure
I can connect from the command line on the prodapp server just fine -- even using tcp:
mysql -h db01 -u user -p --protocol=tcp
But it just won't work running inside the Tomcat container. I've tried all kinds of things but I'm really stumped. It just seems strange that I can connect to the database server using the same copy of Tomcat7 locally but when deployed to production the same copy of tomcat7 can't connect -- even though I can connect from the command line on that production server ... I'm stumped.
Any help is greatly appreciated.
EDIT: Solved my problem after wasting too much good life on it. The answer was I'm stupid. Thanks to everyone who tried to help. I have the app moded w/ a dev and live mode and the connection pool was reading the dev mode this whole time. What really made it confusing is that the sessionfactory was moded to live so it would actually reach the live database and initialize a connection when it started up so i could see it connecting (and running meta data queries in the mysql log), but when it actually went to grab a connection from infinispan it blew up. Oh well -- at least it's working now. Thanks again.
If you're connecting to your MySQL database server from a different box, then you need to explicitly grant permission for that user account to connect from that IP.
You can do this whilst in the command line:
GRANT ALL PRIVILEGES ON *.* TO 'username'#'ip_address'
EDIT: Granting all permissions on all tables generally isn't required, be specific about what permissions you want to grant (http://dev.mysql.com/doc/refman/5.1/en/grant.html)
To see what permissions you currently have:
USE mysql;
SELECT * FROM users;
My apologies if I'm patronising you, just that this is the most common problem that I come across.