Find the answer to your Linux question:
Results 1 to 3 of 3
Currently, MySQL is not accessible from the network. I want to share it so that it is *only* accessible from a specific IP address. How do I do this?...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Mar 2008
    Posts
    1

    How do I share MySQL port?


    Currently, MySQL is not accessible from the network.

    I want to share it so that it is *only* accessible from a specific IP address. How do I do this?

  2. #2
    Linux Guru Lazydog's Avatar
    Join Date
    Jun 2004
    Location
    The Keystone State
    Posts
    2,677
    Find out what port mySQL is using.
    Then ensure that the port is allowed through the firewall.

    Regards
    Robert

    Linux
    The adventure of a life time.

    Linux User #296285
    Get Counted

  3. #3
    Just Joined!
    Join Date
    Jul 2005
    Location
    New-Caledonia
    Posts
    29
    MySQL usually uses port 3306.
    To allow user_ip to access mysql_server_ip, you can use something like :
    Code:
    iptables -A INPUT -p tcp -s user_ip --sport 1024:65535 -d mysql_server_ip --dport 3306 -m state --state NEW,ESTABLISHED -j ACCEPT
    iptables -A OUTPUT -p tcp -s mysql_server_ip --sport 3306 -d user_ip --dport 1024:65535 -m state --state ESTABLISHED -j ACCEPT
    But you haven't told anything about your network configuration ...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •