Luuk wrote:
On 17-02-2013 20:03, Dan Lewis wrote:
On 02/17/2013 01:19 PM, Luuk wrote:
On 16-02-2013 23:44, Dan Lewis wrote:
I can connect to the MySQL server (5.5) on the same computer
using localhost. But how do I connect to a MySQL server on another
computer on the same network? I can not find it in the MySQL
manual, or
I don't know where to look in it.
I use MySQL Workbench for administrative purposes.
--Dan
Here is the link to the manual:
http://dev.mysql.com/doc/refman/5.5/en/server-options.html#option_mysqld_skip-networking
Thanks for the link, but I already have it in ePUB format. My
problem is trying to determine what the manual means. It is very
verbose!
--Dan
It might be....
'skip-networking' in your config (read:my.cnf) means that MySQL will
not listen to any network interface. Yuou will still be able to
connect to localhost, because its something 'sepecial'
http://en.wikipedia.org/wiki/Localhost
"The public releases of the MySQL database differentiate between
localhost and 127.0.0.1. When using localhost from a client program,
say a PHP application, then MySQL connects to the database using a
Unix domain socket rather than making a direct TCP connection[7][8].
To ensure a TCP connection to the database in IPv4 then use
127.0.0.1."
Umm. Are you sure about that?
I am not an expert, but it has been my experience that if
"skip-networking" is enabled, then localhost will not work either. As
you say, there are two ways to access the server: the network or the
Unix socket. The MySQL programs generally use the socket. However, LO
Base and, more specifically, the "connector" driver, use the network
interface. When users complain about not being able to connect to
MySQL, I suggest commenting out the skip-networking directive and when
they do, they are able to connect. That implies that localhost is
controlled by skip-networking. localhost may indeed be something
special, but I think in this respect, it isn't. If you do an
"ifconfig"
while root (Linux), you will see that the lo (loopback) interface,
which
is 127.0.0.1, is listed along with the hardware LAN Ethernet
interface(s). So it is treated at the same level as the Ethernet
interface in the IP (Internet Protocol) stack. BTW, the last
sentence of
the wiki you quote doesn't make sense. Under *nix, the name
"localhost"
is defined as 127.0.0.1 (the lo interface) in the "/etc/hosts" file.
Therefor, when localhost is requested, it gets translated to 127.0.0.1
by the computer, not passed on to MySQL as a special case. MySQL should
have nothing to do with this translation, so it would never see the
name
"localhost".
That said, it seems that the "connector" driver could make that
translation for MySQL. I don't know the interior details of the
connector, but It could get the localhost name from Base and then
process it. It could make a special case of localhost and vector
subsequent requests to the socket. However, as I said, that has not
been my experience.
Just my 2-cents.
Girvin Herr