The setting in the my.cnf is just a default setting. It's impossible to 
have more than one default value. Whichever value you specify last is what 
the setting will be.

When you need to connect to a second server, you need to open another 
client and specify the hostname you want it to connect to. 2 servers = 2 
clients , 3 servers = 3 clients, and so on. If you are programming and 
need to read data from multiple servers you will have to create multiple 
connections, one for each server you need to work with (exactly how would 
depend on the language you are developing with and the database access 
library you are using)

mysql -h address.goes.here -u the_user_account_to_login_with -p

That is the no-frills way to initiate a command line MySQL client session 
with any non-default MySQL server. 
        The -h parameter indicates that you are specifying a particular 
host. The host name can either be an IP addresss or a FQDN 
(fully-qualified domain name).
        The -u identifies what login you want to use on the server you 
specified in -h
        The -p makes the client prompt you for a password.

These are all optional parameters. If you don't specify a parameter 
explicitly , like I did in the example, the default values read from 
my.cnf are what get used.

Yours,
Shawn Green
Database Administrator
Unimin Corporation - Spruce Pine

"Yong Wang" <[EMAIL PROTECTED]> wrote on 08/18/2004 03:22:13 PM:

> Hi, all:
>     In my solaris account, there is a .my.cnf file for me to access
> mysql in remote machine. 
> In the current file, it is configured as:
> host=sg1p.net.tamu.edu
> socket=/tmp/mysql.socka
> 
> If I want to add other remote machine name as netinfo.tamu.edu with
> mysql in the .my.cnf file,
> How can i add multiple remote machines with mysql in the .my.cnf ?
>   Thanks a lot.
> 
>  Yong
> 
> -- 
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]
> 

Reply via email to