LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 09-25-2016, 03:51 PM   #1
sniper8752
Member
 
Registered: Oct 2012
Posts: 546

Rep: Reputation: Disabled
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.

Last edited by sniper8752; 09-25-2016 at 03:52 PM.
 
Old 09-25-2016, 06:43 PM   #2
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,325

Rep: Reputation: 757Reputation: 757Reputation: 757Reputation: 757Reputation: 757Reputation: 757Reputation: 757
What is the value for bind-address in my.cnf?
 
Old 09-27-2016, 07:18 PM   #3
sniper8752
Member
 
Registered: Oct 2012
Posts: 546

Original Poster
Rep: Reputation: Disabled
127.0.0.1
 
Old 09-28-2016, 11:25 AM   #4
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,325

Rep: Reputation: 757Reputation: 757Reputation: 757Reputation: 757Reputation: 757Reputation: 757Reputation: 757
Change it to 0.0.0.0 and grant privileges for <java user>@<java host IP>
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[Postfix/smtp] 25 connection refused / connection timed out wewanwang Linux - Server 2 12-22-2014 01:14 AM
JAVA: SSL Telnet connection "connection refused: connect" error kshaffer85 Programming 1 12-14-2013 07:06 AM
vsftpd not working: Connection attempt failed with "ECONNREFUSED - Connection refused davidlu766 Linux - Server 7 05-03-2010 08:34 PM
Socket Connection Failed: 111 Connection Refused degraffenried13 Linux - General 3 05-31-2009 01:17 AM
eth0 going down (connection reset by peer, then connection refused) Astarath Slackware 1 09-05-2007 05:14 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:16 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration