79636

79636



Using Client Programs in a MultipleServer Environment

To connect with a Client program to a MySQL server that is listening to different network interfaces from

those compiled into your Client, you can use one of the following methods:

•    Start the Client with -ho3t=host_na/ne [221] --por t=port_number [221] to connect using TCP/

IP to a remote server, with —host=127.0.0.1 [221]—port-port_numbor [221] to connect using TCP/IP to a local server. or with —host*localhost [221]—socket2[221 ] to connect to a local server using a Unix socket file or a Windows named pipę.

•    Start the Client with —protocol-TCP [221] to connect using TCP/IP,--protocol=SOCKET [221] to connect using a Unix socket file. -protocol-PlPE [221] to connect using a named pipę. or

protocol-MEMORY [221] to connect using shared memory. For TCP/IP connections. you may also need to specify - -host [221] and - -port [221 ] options. For the other types of connections. you may need to specify a -socket [221] option to specify a Unix socket file or Windows namedpipe

name. or a --shared-memory-base-name [221] option to specify the shared-memory name. Shared-memory connections are supported only on Windows.

•    On Unix, set the MYSQL_UNIX_PORT and MYSQL_TCP_PORT environment variables to point to the Unix socket file and TCP/IP port number before you start your clients. If you normally use a specific socket file or port number. you can place commands to set these environment variables in your

. login file so that they apply each time you log in. See Section 2.12, “Environment Variables".

•    Specify the default Unix socket file and TCP/IP port number in the [client] group of an option file. For exam ple. you can use C: my.cnf on Windows, or the .my. cnf file in your home directory on Unix. See Section 4.2.3.3, “Using Option Files'.

•    In a C program, you can specify the socket file or port number arguments in the mysql_real_connect () cali. You can also have the program read option files by calling mysql_optionsU . See Section 22.8.7, “C API Function Descriptions".

•    If you are using the Perl DBD: :mysql module, you can read options from MySQL option files. For example:

Sdsn - "DBI:mysql:t*st;»ysql_r«ad_default_grou|>»cli*nt;"

. "my3ql_read_default_file“/usr/local/Bysql/data/Biy.cnf";

$dbh = DBI->conn«ct(Sdsn, Suser, Spasaword);

See Section 22.10. “MySOL Perl API".

Other programming interfaces may provide similar capabilities for reading option files.



Wyszukiwarka

Podobne podstrony:
GTID modę and mysql_upgrade. Prior to MySQL 5.6.7, mysql_upgrade could not connect to a MySQL Server
Configuration of MySQL Cluster NDB 7.3 A MySQL server that is part of a MySQL Cluster differs in one
722 KONSrUANTSNOS HATZOFOtPUlJOS 2 In connection with this notę, -we jEirst presnmed that the r
The MySQL Database Server is very fast, reliable, scalable, and easy to use. If that is what you are
Replication and Character Sets The following applies to replication between MySQL servers that use d
połacz do pary 1 Shapes Draw a linę to the shape that is the same. Copyright © BillyBear4Kids.com
CSG258 Relative Pronouns 247 5.    Mark came to see a movie that is a foreign (extrai
Connecting to the MySQL Server For a Client program to be able to connect to the MySQL server, it mu
APPOINTMENT OF PHY3ICIANS TO SERVE IN CONNECTION WITH WORKMEN ’ S CO^SNSATION PROGRAM (contigued) I
C3 - Acquaintance with forecasting methods using simple linear and multiple regression analysis C4 -
(000001) 14-07-2005 07:31:44 - (not logged in) (192.168.0.104) > connected to ip : 192.168.0.101
Achieue your indmdual goals in multiple use cases The project deals with a software system designed
High precision multiple Z stages to move load celi , profileretc. in Zaxis Interchangeable load cell
Ciekawski George kolorowanka (63) Who is hidden in the stars? Connect the stars in numerical 

więcej podobnych podstron