Find the answer to your Linux question:
Results 1 to 5 of 5
OK, I just installed MySQL5 on Debian Lenny on my home network. The linux box is configured with fixed ip. This is my first go round with mySQL on linux ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined! fguy64's Avatar
    Join Date
    Aug 2009
    Posts
    87

    mySQL: bind-address = in my.cnf


    OK, I just installed MySQL5 on Debian Lenny on my home network. The linux box is configured with fixed ip. This is my first go round with mySQL on linux

    As a first step, I try to connect remotely from Windows XP using MySQL Administartor, and I get MySQL error 2003, which as I understand is a connection error as opposed to an authentication error.

    The obvious choice was the bind-address = 127.0.0.1 in /etc/mysql/my.cnf. By changing this to the network ip address I got a connection, and also a mySQL 1130 error. There's a lot of info on the net on that one, I can probably deal with it.

    My question is, it seemed a little odd about that default bind-address. the mySQL website warns against that setting, but I didn't see any information about having two bind addresses, or actually changing this setting. presumably you would need to keep the 127.0.0.1 bind address for cases where the connection request was coming from any application running on the same server?

    I suppose I could just go ahead and try it, but I thought I'd maybe hear from somone who had been down that road. It's a little unclear whether that setting should be changed.

  2. #2
    Just Joined!
    Join Date
    Jul 2009
    Posts
    58
    By default mysql has "skip-networking" turned on. Have you tried to disable it? You actually might be connecting through the socket rather than IP.

  3. #3
    Just Joined! fguy64's Avatar
    Join Date
    Aug 2009
    Posts
    87
    aram535, the answer to your question seems to be "not applicable", because in /etc/mysql/my.cnf it says
    Code:
    # Instead of skip-networking the default is now to listen only on
    # localhost which is more compatible and is not less secure.
    bind-address = 127.0.0.1
    so there is no 'skip-networking' item in the file. But a "local-host" bind seems to amount to more or less the same thing.

    It was only by changing the bind-address to the actual ip-address was I able to establish any kind of a connection at all from the network. But then I got error 1130, which is a well documented problem with a clear solution, except that it is not clear from the documentation I found what is supposed to happen to that default bind-address. Do I just change it to the ip of the NIC, or do I have two bindings?

    I could just try it, but I wanted to get a second opinion.

    I would assume two bindings, so I could have connections from the LAN, and also from php on the same machine.

    see what I mean?

  4. $spacer_open
    $spacer_close
  5. #4
    Just Joined!
    Join Date
    Jul 2009
    Posts
    58
    Must be a 5.1 "feature".

    Set the bind-address to 0.0.0.0, that should bind to all IPs on the box, 127.0.0.1 as well as the eth0 one. (If that is what you want).

    Accessing via socket or 127.0.0.1 will be faster for larger sets than going through eth.

  6. #5
    Just Joined! fguy64's Avatar
    Join Date
    Aug 2009
    Posts
    87
    Thanks bud. I made the change, and was able to establish local and remote connections to the mysql server. There is still the authentication issue, but I don't expect any problems there.

Posting Permissions

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