Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Networking & Security
  • Search

[solved] (noob?) MySQL connection over LAN

Having problems getting connected to the internet or running a server? Wondering about securing your box? Ask here.
Post Reply
Advanced search
9 posts • Page 1 of 1
Author
Message
Arla
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 97
Joined: Thu Aug 10, 2006 7:18 am
Location: SE
Contact:
Contact Arla
Website

[solved] (noob?) MySQL connection over LAN

  • Quote

Post by Arla » Thu Jun 14, 2007 12:24 pm

I've got one machine running a MySQL daemon, and I try to connect to that one with another machine.
mysql -u user -h machine1 -p gives "ERROR 2003 (HY000): Can't connect to MySQL server on 'machine1' (111)" but I can ping machine1, no problem.

I'm sure there is some very easy part of configuration I have just missed...
Last edited by Arla on Sun Jun 17, 2007 2:09 pm, edited 2 times in total.
Top
smadasam
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 82
Joined: Wed Jun 08, 2005 1:22 pm
Location: Seattle, WA
Contact:
Contact smadasam
Website

  • Quote

Post by smadasam » Thu Jun 14, 2007 2:30 pm

Do you have some kind of firewall between you and that machine?
Intel 486 DX4 100
16 MB RAM
ATI Mach64 2 MB
300 MB HD
14.4 kbps
Top
Arla
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 97
Joined: Thu Aug 10, 2006 7:18 am
Location: SE
Contact:
Contact Arla
Website

  • Quote

Post by Arla » Thu Jun 14, 2007 2:47 pm

Yes, the machines are on a WLAN with a firewall-provided router.
Top
smadasam
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 82
Joined: Wed Jun 08, 2005 1:22 pm
Location: Seattle, WA
Contact:
Contact smadasam
Website

  • Quote

Post by smadasam » Thu Jun 14, 2007 3:37 pm

If they are on the same network that has a firewall to the rest of the world, that is ok. I was just wondering if the machine you are trying to connect to is running IPtables or something.
Intel 486 DX4 100
16 MB RAM
ATI Mach64 2 MB
300 MB HD
14.4 kbps
Top
Hu
Administrator
Administrator
Posts: 24385
Joined: Tue Mar 06, 2007 5:38 am

  • Quote

Post by Hu » Fri Jun 15, 2007 2:24 am

Is the target machine listening for MySQL connections over TCP? What is the output of netstat -ntl on the machine running the MySQL daemon?
Top
Arla
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 97
Joined: Thu Aug 10, 2006 7:18 am
Location: SE
Contact:
Contact Arla
Website

netstat -ntl

  • Quote

Post by Arla » Sun Jun 17, 2007 1:49 pm

Code: Select all

# netstat -ntl | grep :3306
tcp        0      0 127.0.0.1:3306          0.0.0.0:*               LISTEN
Because MySQL uses port 3306. This is it, isn't it? I have to change the listen ip in mysql to 0.0.0.0?
How? Let's see who is the fastest of you and my googling skills :)

Edit: Change the bind-address in /etc/mysql/my.cnf
Last edited by Arla on Sun Jun 17, 2007 2:03 pm, edited 1 time in total.
Top
godish
n00b
n00b
Posts: 50
Joined: Tue Oct 05, 2004 5:39 am
Location: Boston MA
Contact:
Contact godish
Website

  • Quote

Post by godish » Sun Jun 17, 2007 2:03 pm

Code: Select all

# security:
# using "localhost" in connects uses sockets by default
# skip-networking
#bind-address                           = 127.0.0.1
Comment out that line in your /etc/mysql/my.cnf

(no google)
Last edited by godish on Sun Jun 17, 2007 2:05 pm, edited 2 times in total.
Nobody makes me bleed my own blood... NOBODY!
Top
Arla
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 97
Joined: Thu Aug 10, 2006 7:18 am
Location: SE
Contact:
Contact Arla
Website

  • Quote

Post by Arla » Sun Jun 17, 2007 2:05 pm

"Last edited by Arla on Sun Jun 17, 2007 3:03 pm"
"Posted: Sun Jun 17, 2007 3:03 pm"

Wow. Anyways, thanks.
Top
godish
n00b
n00b
Posts: 50
Joined: Tue Oct 05, 2004 5:39 am
Location: Boston MA
Contact:
Contact godish
Website

  • Quote

Post by godish » Sun Jun 17, 2007 2:06 pm

lol :D
Nobody makes me bleed my own blood... NOBODY!
Top
Post Reply

9 posts • Page 1 of 1

Return to “Networking & Security”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic