MYSQL_CONFIG(1) MySQL Database System MYSQL_CONFIG(1)

2
3
4

NAME

6       mysql_config - get compile options for compiling clients
7

SYNOPSIS

9       mysql_config options
10

DESCRIPTION

12       mysql_config provides you with useful information for compiling your
13       MySQL client and connecting it to MySQL.
14
15       mysql_config supports the following options:
16
17       ·  --cflags
18
19          Compiler flags to find include files and critical compiler flags and
20          defines used when compiling the libmysqlclient library.
21
22       ·  --include
23
24          Compiler options to find MySQL include files. (Note that normally
25          you would use --cflags instead of this option.)
26
27       ·  --libmysqld-libs, --embedded
28
29          Libraries and options required to link with the MySQL embedded
30          server.
31
32       ·  --libs
33
34          Libraries and options required to link with the MySQL client
35          library.
36
37       ·  --libs_r
38
39          Libraries and options required to link with the thread-safe MySQL
40          client library.
41
42       ·  --port
43
44          The default TCP/IP port number, defined when configuring MySQL.
45
46       ·  --socket
47
48          The default Unix socket file, defined when configuring MySQL.
49
50       ·  --version
51
52          Version number for the MySQL distribution.
53
54
55If you invoke mysql_config with no options, it displays a list of all options
56that it supports, and their values:
57
58   shell> mysql_config
59   Usage: /usr/local/mysql/bin/mysql_config [options]
60   Options:
61     --cflags         [-I/usr/local/mysql/include/mysql -mcpu=pentiumpro]
62     --include        [-I/usr/local/mysql/include/mysql]
63     --libs           [-L/usr/local/mysql/lib/mysql -lmysqlclient -lz
64                       -lcrypt -lnsl -lm -L/usr/lib -lssl -lcrypto]
65     --libs_r         [-L/usr/local/mysql/lib/mysql -lmysqlclient_r
66                       -lpthread -lz -lcrypt -lnsl -lm -lpthread]
67     --socket         [/tmp/mysql.sock]
68     --port           [3306]
69     --version        [4.0.16]
70     --libmysqld-libs [-L/usr/local/mysql/lib/mysql -lmysqld -lpthread -lz
71                       -lcrypt -lnsl -lm -lpthread -lrt]
72
73You can use mysql_config within a command line to include the value that it
74displays for a particular option. For example, to compile a MySQL client
75program, use mysql_config as follows:
76
77   shell> CFG=/usr/local/mysql/bin/mysql_config
78   shell> sh -c "gcc -o progname `$CFG --cflags` progname.c `$CFG --libs`"
79
80When you use mysql_config this way, be sure to invoke it within backtick (‘`’)
81characters. That tells the shell to execute it and substitute its output into
82the surrounding command.
83
85       Copyright 1997-2007 MySQL AB
86
87       This documentation is NOT distributed under a GPL license. Use of this
88       documentation is subject to the following terms: You may create a
89       printed copy of this documentation solely for your own personal use.
90       Conversion to other formats is allowed as long as the actual content is
91       not altered or edited in any way. You shall not publish or distribute
92       this documentation in any form or on any media, except if you
93       distribute the documentation in a manner similar to how MySQL
94       disseminates it (that is, electronically for download on a Web site
95       with the software) or on a CD-ROM or similar medium, provided however
96       that the documentation is disseminated together with the software on
97       the same medium. Any other use, such as any dissemination of printed
98       copies or use of this documentation, in whole or in part, in another
99       publication, requires the prior written consent from an authorized
100       representative of MySQL AB. MySQL AB reserves any and all rights to
101       this documentation not expressly granted above.
102
103       Please email <docs@mysql.com> for more information.
104

SEE ALSO

106       For more information, please refer to the MySQL Reference Manual, which
107       may already be installed locally and which is also available online at
108       http://dev.mysql.com/doc/.
109

AUTHOR

111       MySQL AB (http://www.mysql.com/).  This software comes with no
112       warranty.
113
114
115
116MySQL 5.0                         07/04/2007                   MYSQL_CONFIG(1)
Impressum