LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Connection Refused (https://www.linuxquestions.org/questions/linux-software-2/connection-refused-4175590133/)

sniper8752 09-25-2016 04:51 PM

Connection Refused
 
I am connecting to my mysql server at 192.168.1.7. I get this error though in my program: "Caused by: java.net.ConnectException: Connection refused".
It is running:
Code:

pi@raspberrypi /etc/mysql $ sudo mysqladmin -u java -p status
Enter password:
Uptime: 3280  Threads: 1  Questions: 488  Slow queries: 0  Opens: 53  Flush tables: 1  Open tables: 46  Queries per second avg: 0.148

I don't have iptables or ufw running. I can ping the server ok. netstat -a does not show 3306. the mysql config file is set to listen on 3306.

keefaz 09-25-2016 07:43 PM

What is the value for bind-address in my.cnf?

sniper8752 09-27-2016 08:18 PM

127.0.0.1

keefaz 09-28-2016 12:25 PM

Change it to 0.0.0.0 and grant privileges for <java user>@<java host IP>


All times are GMT -5. The time now is 10:32 AM.