Hi Andreas,

Good question. I saw this topic discussed many times in books. Please allow me 
to add my $0.02.

First for the localhost entry. You will define a grant command like

GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' IDENTIFIED BY PASSWORD 
'mypassword' WITH GRANT OPTION

Then for the remote connection you use

GRANT SELECT PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY PASSWORD 
'mypassword'

Note that the remote connection has different privileges (here only SELECT). 
This way you can only change something if you are local on the machine. That 
is in my eyes the safest, however that my not be practible at all.

Note: You could also put the [EMAIL PROTECTED] like 'root'@'172.168.1.12' , 
but it is safer to put the full qualified hostname like dbclient.gmx.net 
(sample) to avoid that any other host can use the account. Not that the 
wildcard will allow a root user to connect from any host.

I haven't heard or read of the possibility to choose the network device to 
connect to. While I undestand what you are thinking I don't think that's 
pracical. It's much easier to telnet or SSH to te server machine and connect 
local.

Best regards

Nils Valentin
Tokyo/Japan


2003年 7月 27日 日曜日 12:06、Andreas さんは書きました:
> Hello :)
>
> I have an development/test server on a windows 2000 box running.
> AFAIK mysql needs 127.0.0.1 to connect to the localhost, if I use it on
> the db-server's machine.
> Usually I'd connect via LAN so I need mysqld listen on 2 IPs.
>
> 1) 127.0.0.1
> 2) 192.168.1.42    <-- LAN-IP
>
> This box has a second LAN-Interface and a third which connects to ADSL.
> Those 2 are to be considered realm of evel.
>
> I just rather have mysql listening on localhost and one of the
> LAN-interfaces. Is this possible at all ?
>
> There is this parameter for mysqld :  bind-address
> It only works with 1 aeddress. Even when I put 2 such lines in my.cnf it
> just takes the second value.
>
> Do I have to let it listen on 0.0.0.0 and let mysqld sort the access
> attemts with the grant tables ?

-- 
---
Valentin Nils
Internet Technology

 E-Mail: [EMAIL PROTECTED]
 URL: http://www.knowd.co.jp
 Personal URL: http://www.knowd.co.jp/staff/nils


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to