LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 08-20-2004, 11:28 AM   #1
Dasc
Member
 
Registered: Jul 2004
Posts: 47

Rep: Reputation: 15
mysql on lan


hi all
I've just installed mysql (+phpmydmin) on my second pc (debian of course, no x-windows), everything works fine but I need the db to be accessible from the other pcs of the lan and this is not working :P
I've searched around and I've found out that I had to comment a line in my.cnf (skip-networking)
I've restarted the deamon but it's still not accepting connections from the other pc..

everything else has still default settings

should I do something else?
 
Old 08-20-2004, 01:01 PM   #2
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
Can you confirm that the port is open and that you have no firewall rules in place:
netstat -nlp
iptables -nL

Post the out put from both commands if you are unsure.
 
Old 08-20-2004, 01:46 PM   #3
Dasc
Member
 
Registered: Jul 2004
Posts: 47

Original Poster
Rep: Reputation: 15
uhm well it should be ok, I've never set any iptables rule and the mysql socket is listening but uhm.. I don't see anything explicitly listening on 3306

well I'm not a major expert in linux networking for sure so here's the output

Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:4000 0.0.0.0:* LISTEN 804/mlnet
tcp 0 0 0.0.0.0:4001 0.0.0.0:* LISTEN 804/mlnet
tcp 0 0 0.0.0.0:4002 0.0.0.0:* LISTEN 804/mlnet
tcp 0 0 0.0.0.0:37 0.0.0.0:* LISTEN 784/inetd
tcp 0 0 0.0.0.0:2632 0.0.0.0:* LISTEN 804/mlnet
tcp 0 0 0.0.0.0:9 0.0.0.0:* LISTEN 784/inetd
tcp 0 0 0.0.0.0:6346 0.0.0.0:* LISTEN 804/mlnet
tcp 0 0 0.0.0.0:139 0.0.0.0:* LISTEN 930/smbd
tcp 0 0 0.0.0.0:13 0.0.0.0:* LISTEN 784/inetd
tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN 577/portmap
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 3019/apache
tcp 0 0 0.0.0.0:4080 0.0.0.0:* LISTEN 804/mlnet
tcp 0 0 0.0.0.0:113 0.0.0.0:* LISTEN 784/inetd
tcp 0 0 0.0.0.0:21 0.0.0.0:* LISTEN 945/ftpd: accepting
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 936/sshd
tcp 0 0 0.0.0.0:4662 0.0.0.0:* LISTEN 804/mlnet
tcp 0 0 0.0.0.0:5432 0.0.0.0:* LISTEN 909/postmaster
tcp 0 0 0.0.0.0:699 0.0.0.0:* LISTEN 941/rpc.statd
tcp 0 0 0.0.0.0:445 0.0.0.0:* LISTEN 930/smbd
tcp 0 0 0.0.0.0:1213 0.0.0.0:* LISTEN 804/mlnet
udp 0 0 0.0.0.0:1024 0.0.0.0:* 804/mlnet
udp 0 0 10.0.0.2:137 0.0.0.0:* 928/nmbd
udp 0 0 0.0.0.0:137 0.0.0.0:* 928/nmbd
udp 0 0 0.0.0.0:9 0.0.0.0:* 784/inetd
udp 0 0 10.0.0.2:138 0.0.0.0:* 928/nmbd
udp 0 0 0.0.0.0:138 0.0.0.0:* 928/nmbd
udp 0 0 127.0.0.1:1039 0.0.0.0:* 3207/smbd
udp 0 0 0.0.0.0:693 0.0.0.0:* 941/rpc.statd
udp 0 0 0.0.0.0:696 0.0.0.0:* 941/rpc.statd
udp 0 0 0.0.0.0:4666 0.0.0.0:* 804/mlnet
udp 0 0 0.0.0.0:2632 0.0.0.0:* 804/mlnet
udp 0 0 0.0.0.0:6346 0.0.0.0:* 804/mlnet
udp 0 0 0.0.0.0:111 0.0.0.0:* 577/portmap
Active UNIX domain sockets (only servers)
Proto RefCnt Flags Type State I-Node PID/Program name Path
unix 2 [ ACC ] STREAM LISTENING 293903 1619/mysqld /var/run/mysqld/mysqld.sock
unix 2 [ ACC ] STREAM LISTENING 1068 909/postmaster /var/run/postgresql/.s.PGSQL.5432
unix 2 [ ACC ] STREAM LISTENING 896 788/lpd /dev/printer




Chain INPUT (policy ACCEPT)
target prot opt source destination

Chain FORWARD (policy ACCEPT)
target prot opt source destination

Chain OUTPUT (policy ACCEPT)
target prot opt source destination
 
Old 08-20-2004, 02:15 PM   #4
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
You are quite correct. The iptables rules are definately not blocking anything and mysql is not listening.

Make sure that you have the line:
port = 3306

under the [mysqld] section of /etc/my.cnf then restart mysql. Can you see 3306 in the netstat list this time?
netstat -nlp | grep 3306
 
Old 08-20-2004, 02:28 PM   #5
Dasc
Member
 
Registered: Jul 2004
Posts: 47

Original Poster
Rep: Reputation: 15
Yeah I can see it O_o

the setting was there, I just restarted the server...
I think I restarted it at least 3 times with phpmyadmin before, now I've tried trough shell and it worked
is there some sort of incompatibility?

anyway the good thing is that it works now
thabks a lot for your help ^_^
 
Old 08-20-2004, 02:50 PM   #6
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
Good to see you got it working.

I'm not sure that you can restart mysql from phpmyadmin though.
 
Old 08-22-2004, 11:40 AM   #7
jeru
Member
 
Registered: Feb 2003
Location: Arizona
Distribution: Debian Sid
Posts: 57

Rep: Reputation: 15
EDIT: nm

Last edited by jeru; 08-22-2004 at 11:41 AM.
 
  


Reply



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
ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql. NoviceW Linux - Networking 17 09-17-2014 02:13 PM
ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql. suziecorbett Linux - Software 8 10-09-2008 01:52 AM
mysql error Can't connect to local MySQL server through socket '/var/lib/mysql/mysql. Dannux Linux - Software 3 03-24-2006 08:44 AM
Access MySQL through LAN rpoblems onesandtwos Linux - Networking 6 11-25-2005 07:27 AM
iptables trouble, LAN to MySQL on Firewall dwynter Linux - Security 3 11-01-2002 06:50 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 11:05 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