idea [08S01] Communications link failure - mysql

I just use IDEA recently and want to use IDEA to connect MySQL(8.0.12).but the IDEA indicate below
However, I use cmd could connect to my database,thus I did not configure out the problem.
I am in serah of many ways to solve this problem on tech forum but those are not working.
change mysql to lower version driver
set time_zone
add properties on url

There are a couple of things to check to solve the 'Communications links' failure.
One thing in particular is to check whether your MySQL server accepts TCP connections. In your terminal, it looks like you are using named pipes.
Make sure your MySQL server allows TCP connections; check for the bind-address configuration in mysql.ini under [mysqld] section. Its value should be at least 127.0.0.1, or set it as * to bind to all (not always a good idea).
Another point is the skip_networking configuration. Check if you have that, and remove and restart MySQL server. I believe this is set by default when you are installing MySQL.
(Also note that 8.0.17 is 'ancient' already).

Related

MySQL "unauthenticated users" even if 'skip-name-resolve' is enabled

I'm facing an issue that i'm stuck...
We've MySQL version 5.5.21 and we've detected recently some "unauthenticated users" appears and disappears in the processlist. The DNS server is well and responding fastly. Even that, we use IP address to set privileges for MySQL users.
To be sure, i've enabled skip-name-resolve option in the my.cnf file and restart the service. But, these requests still appear so i conclude there's something else to check but i don't know what after many investigations.
I've read that these requests can paralyzed all the TCP pool of MySQL, but in my case there's not this issue at the moment.
So, is it a beggining of dysfunctions in my MySQL server or is it just a normal behavior ?
Thanks for your help

Google Cloud SQL to external slave - can't get SSL working

I've run into a problem. I have a Google Cloud SQL instance (Second Generation) and I use it as a master to run my own replication slave from. It all works fine, but I'm trying to change the connection to use SSL and failing. I have followed a variety of guides...
I've tried putting this in my.cnf
[client]
ssl-ca=server-ca.pem
ssl-cert=client-cert.pem
ssl-key=client-key.pem
I've also tried putting those lines under the [mysqld] heading. I've changed the slave to use SSL using
CHANGE MASTER TO MASTER_SSL=1;
I've put the word ssl in my.cnf (this causes the connection to fail). I've also tried to change the slave using
CHANGE MASTER TO MASTER_SSL=1, MASTER_SSL_CA = 'ca-cert.pem', MASTER_SSL_CERT = 'client-cert.pem', MASTER_SSL_KEY = 'client-key.pem';
Nothing will make it use SSL. If I query the slave is says SSL is disabled but putting ssl in the [mysqld] section stops replication working.
The certificates themselves are all downloaded from the instance and work fine in a PHP database class I use to connect from a different server.
Does anyone have any experience with this? I know it's failing as I've used tcpdump to watch the port and also \s in the MySQL console says SSL is off.
MySQL on the slave is version: 5.6.38-log MySQL Community Server (GPL).
On Google it reports MySQL 5.6
Thanks in advance!
Found the issue, I hadn't installed mysql-devel, now working

How to set 3306 port free after uninstalling MySQL?

I just uninstalled MySQL server, restarted my laptop and reinstalled MySQL server on Windows 8.1.
When I tried to configure it, it said "Port 3306 is already in use" (or something). I know I can use another port number, but I wanted to know how to set 3306 port free and use it.
Actually the port should not be in use anymore.
Did you try out who uses that port? try netstat -ao. Will return you a list of opened ports plus the process id of the program that uses that. You can check which program it is in Task Manager.
Obviously there must be some process binding to the port.
Have a look at this answer on a similar topic to find out which process it is:
https://stackoverflow.com/questions/48198/how-can-you-find-out-which-process-is-listening-on-a-port-on-windows
Once you have the info in hand you can deal with the process - whether it is a remainder of the old mysql installation or something else.

Error No. 2003. Can't connect to mysql server

I has had two days searching and exploring solutions regarding the error 2003.
Can't connect to mysql server on 'Server name'.
The firewall is off and I had added the port 3306, the one that mysql uses.
Any recommendation?
Please refer this FAQ which describes how to solve this issue: http://faq.webyog.com/content/23/15/en/error-no-2003-can_t-connect.html
Error No. 2003: Can't connect to MySQL server on 'localhost' (or some other host)
simply means that connection is not possible for one of the following (or similar) reasons:
There is no MySQL server running at the specified host
Connection to the MySQL server is not allowed using TCP-IP. Check the 'skip-networking' setting in the MySQL configuration file (my.ini on Windows, my.cnf on Unix/Linux). It shall be commented out like '#skip-networking'. If it is not commented out, then do it and restart the MySQL server for the change to take effect. SQLyog needs to connect using TCP-IP.
Some networking issue prevents connection. It could be a network malconfiguration or a firewall issue.
When trying to connect to a MySQL server at an ISP this error message often indicates that direct connection to MySQL has been blocked. You must then use HTTP-tunneling or SSH-tunneling to connect.
It worked for me.controll pannel->administrative tools->services->mysql and start mysql.Some times simple solution saves lot of time.
normally means that there is no MySQL server running on the system .
check your server running
this could be due to firewalls of the system try below command and check
service iptables stop
i have the same issue but i fix it.
my hostname is DEBIAN, i just modify the file my.cnf ( for mysql) and set bindaddress : 0.0.0.0
this option say to mysql to listen all interfaces. restart your server and finish
if your question refer to can't connect to mysql on hosting (cpanel), i also had same problem.
I also turn off firewall, but it doesn't solve my problem.
Rather than using server name or domain name on Mysql Host Address, i using ip address given by hosting provider.
And it works.
Going to services and starting MYSQL service doesn't work for me.
Finally, I hit the following commands inside the MYSQL command-line client:
ALTER USER 'username'#'localhost' IDENTIFIED WITH mysql_native_password BY 'password';
There is a high chance that you are making one of the two mistakes.
First :
You are inputting the wrong password. check your password or change it with
this command
ALTER USER 'root'#'localhost' IDENTIFIED WITH mysql_native_password BY 'very_strong_password';
In place of 'very_strong_password' give a strong password of your choice.
Second:
You are using '#' in the password which can be confused with the other with #localhost.
The SQL Sever might not be installed.
Please refer this to install:
MySQL
The solution worked for me
Go to services and start MySql services
window: press the start button and search services. Then star MySql services

Connecting to MySQL from other machines

I have MySQL installed on a Windows 2003 server on our domain. I cannot connect to it from other machines on the domain. I open up the MySQL Administrator panel and try to change the server name from localhost to the machine name it does not recognize it. I have tried fully qualifying the name also. Any ideas what I need to change?
What sort of error, a total inability to connect? Windows Firewall is the first place I'd look, to make sure port 3306 is open.
have you double checked permissions on the databases using something like
grant all priviliges on 'database'.'*' to 'username'#'remote_machine_ip' identified by 'password';
Like Sukasa mentioned, also double check any firewalls you may have configured
You need to look in the my.cnf file and look for the bind-address setting and the skip-networking setting. You want the latter removed or commented out and the former to be the machine's IP address. Restart MySQL after you make changes.
A number of MySQL install packages defaulted to a local socket only install, which is helpful for security but considerably impairs network connectivity. :-)
I was trying to connect to the database using the default root userid. I created a new user and gave this user read permission to the needed tables.