I am running MySQL on Ubuntu. mysql cli, as does http://localhost/phpmyadmin, but I cannot connect using java.sql.DriverManager.getConnection:
java.net.SocketException: Network is unreachable (connect failed)
ps tells me the service is running
/usr/sbin/mysqld --daemonize --pid-file=/run/mysqld/mysqld.pid
The file /etc/mysql/my.cnf includes /etc/mysql/mysql.conf.d/ which contains another my.cnf which contains
[mysqld]
port = 3306
Using the cli, show variables like 'skip_networking' is OFF.
netstat -l | grep sql indicates a UNIX domain socket is listening, but nothing on TCP for sql.
Is this why jdbc can't connect?
How do I fix it?