The MySQL Startup Guide talks about connecting to other hosts, but the default installation prevents network access by having bind-address = 127.0.0.1 in /etc/mysql/my.cnf. All the documents I could find on how to get MySQL going omitted any mention of this detail, from which I assumed that it should just work out of the box. Please amend the startup guide to include an instruction to change this value, and show what value to give it - whether to comment-out the bind address or to set it to, say, 0.0.0.0. Reproducible: Always
CCing the guys in charge of MySQL on Gentoo. Any tips? Any quick inserts for our doc? Thanks!
Thats a really old doc ;-). Nothing in there mentions connecting from hosts other than localhost anyway. If you will be connecting from other machines, either change bind-address to reflect your internal LAN subnet, or uncomment it unentirely after making sure that you don't have default or empty passwords for any mysql users.
Well, I'm sorry it's so old - I don't maintain it. Yes, I know now what I have to do; my point is that someone following that document doesn't, and isn't offered a clue. I'm not asking for guidance, having found it elsewhere, but for the document to be made more helpful.
We don't know what to add to the doc unless the original reporter can list what exactly needs to be changed, and where it should be added. Otherwise, we may just have to go with our MySQL maintainer's suggestion that we don't cover remote connection at all.
Somewhere between code listings 1.3 and 1.5 in www.gentoo.org/doc/en/mysql-howto.xml you could add instructions to change (or comment-out) the bind-address line in /etc/mysql/my.cnf in the case of a mysql server that is to accept connections from other machines. That's all that's needed, as far as I can see. Something like this, perhaps: "If you are setting up a mysql server for a network, so that mysql must be able to accept connections from other machines, you need to inactivate the configuration option that binds the server to just the local loopback interface. The simple way to do this is to put a # character before the line in /etc/mysql/my.cnf that reads 'bind-address 127.0.0.1'. This will enable the mysql server to accept connections on all interfaces." Then you could add a code listing showing the change. By doing this you would allow the references to host selection in code listing 1.5 to mean something. Hope that helps.
Seems like it would need a fairly detailed amount of info and examples on changing security for network connections, multiple remote addresses, and username/hostname changes. As Robin mentioned in comment #2, the guide strictly sticks to localhost connections, so I'd like to keep it that way, without adding potentially insufficient directions on remote connections. Better not to mention it at all, in my view. But the report is appreciated!