Results 1 to 5 of 5
Thread: mySQL: bind-address = in my.cnf
Enjoy an ad free experience by logging in. Not a member yet? Register.
mySQL: bind-address = in my.cnf
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.
- Join Date
- Jul 2009
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.
aram535, the answer to your question seems to be "not applicable", because in /etc/mysql/my.cnf it says
# 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
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?
- Join Date
- Jul 2009
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.
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.