Date: prev next · Thread: first prev next last
2013 Archives by date, by thread · List index


On 02/18/2013 03:05 PM, Girvin R. Herr wrote:


Luuk wrote:
On 17-02-2013 22:53, Girvin R. Herr wrote:


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



a special  adddition to this:

on my linux box:
opensuse:/home/luuk # mysql -u root -p test -h localhost
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 4
Server version: 5.5.28-log Source distribution

.....
mysql> \s
--------------
mysql  Ver 14.14 Distrib 5.5.28, for Linux (x86_64) using readline 6.2
......
Server version:         5.5.28-log Source distribution
Protocol version:       10
Connection:             Localhost via UNIX socket
.....
mysql>



and:
opensuse:/home/luuk # mysql -u root -p test -h 127.0.0.1
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 5
Server version: 5.5.28-log Source distribution

......
mysql> \s
--------------
mysql  Ver 14.14 Distrib 5.5.28, for Linux (x86_64) using readline 6.2

.....
Server version:         5.5.28-log Source distribution
Protocol version:       10
Connection:             127.0.0.1 via TCP/IP
.....
mysql>


notice the differences in the 'Connection:'-line.........

and, of course, i DO have the line:
127.0.0.1       localhost
in my /etc/hosts file


Luuk,
Yes, I stand corrected. I have and was thinking of MySQL 5.0. I now understand that 5.5+ is different. I have already made note of this for future reference. MySQL 5.5 is using a way to circumvent the normal translation. Interesting.
Thanks.
Girvin Herr
      Update and corrections about what I wrote earlier:

"MySQL server 5.1 has a skip network section. This has been modified in Server 5.5 to this in my.cnf:

# 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

The reference in the MySQL Reference Manual ( "Access Control, Stage 1: Connection Verification") states what to put in place of 127.0.0.1 for using MySQL over a network. In my case, I can use 192.168.2.% or 192.168.2.0/255.255.255.0."

What I have found from a web search is how to connect to my MySQL server 5.5: modify the above section in the my.cnf file by adding a #.

# 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

I have done this. I also added a user to my host 192.168.2.101 (my IP on my laptop). After restarting my MySQL server, I connected to the server on my tower. YAH!!!

--Dan

--
For unsubscribe instructions e-mail to: users+help@global.libreoffice.org
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.