1MYSQL_CONFIG(1) MySQL Database System MYSQL_CONFIG(1)
2
3
4
6 mysql_config - get compile options for compiling clients
7
9 mysql_config options
10
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
20 and defines used when compiling the libmysqlclient library. The
21 options returned are tied to the specific compiler that was used
22 when the library was created and might clash with the settings for
23 your own compiler. Use --include for more portable options that
24 contain only include paths.
25
26 · --include
27
28 Compiler options to find MySQL include files.
29
30 · --libmysqld-libs, --embedded
31
32 Libraries and options required to link with the MySQL embedded
33 server.
34
35 · --libs
36
37 Libraries and options required to link with the MySQL client
38 library.
39
40 · --libs_r
41
42 Libraries and options required to link with the thread-safe MySQL
43 client library.
44
45 · --plugindir
46
47 The default plugin directory path name, defined when configuring
48 MySQL. This option was added in MySQL 5.1.24.
49
50 · --port
51
52 The default TCP/IP port number, defined when configuring MySQL.
53
54 · --socket
55
56 The default Unix socket file, defined when configuring MySQL.
57
58 · --variable=VAR
59
60 Path to MySQL include, library and plugin directories. VAR is one
61 of `pkgincludedir`, `pkglibdir` and `plugindir`, respectively.
62
63 · --version
64
65 Version number for the MySQL distribution.
66
67 If you invoke mysql_config with no options, it displays a list of all
68 options that it supports, and their values:
69
70 shell> mysql_config
71 Usage: /usr/local/mysql/bin/mysql_config [options]
72 Options:
73 --cflags [-I/usr/local/mysql/include/mysql -mcpu=pentiumpro]
74 --include [-I/usr/local/mysql/include/mysql]
75 --libs [-L/usr/local/mysql/lib/mysql -lmysqlclient -lz
76 -lcrypt -lnsl -lm -L/usr/lib -lssl -lcrypto]
77 --libs_r [-L/usr/local/mysql/lib/mysql -lmysqlclient_r
78 -lpthread -lz -lcrypt -lnsl -lm -lpthread]
79 --socket [/tmp/mysql.sock]
80 --port [3306]
81 --version [4.0.16]
82 --libmysqld-libs [-L/usr/local/mysql/lib/mysql -lmysqld -lpthread -lz
83 -lcrypt -lnsl -lm -lpthread -lrt]
84
85 You can use mysql_config within a command line to include the value
86 that it displays for a particular option. For example, to compile a
87 MySQL client program, use mysql_config as follows:
88
89 shell> CFG=/usr/local/mysql/bin/mysql_config
90 shell> sh -c "gcc -o progname `$CFG --include` progname.c `$CFG --libs`"
91
92 When you use mysql_config this way, be sure to invoke it within
93 backtick (“`”) characters. That tells the shell to execute it and
94 substitute its output into the surrounding command.
95
97 Copyright 2007-2008 MySQL AB, 2008-2010 Sun Microsystems, Inc.
98
99 This documentation is free software; you can redistribute it and/or
100 modify it only under the terms of the GNU General Public License as
101 published by the Free Software Foundation; version 2 of the License.
102
103 This documentation is distributed in the hope that it will be useful,
104 but WITHOUT ANY WARRANTY; without even the implied warranty of
105 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
106 General Public License for more details.
107
108 You should have received a copy of the GNU General Public License along
109 with the program; if not, write to the Free Software Foundation, Inc.,
110 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see
111 http://www.gnu.org/licenses/.
112
113
115 For more information, please refer to the MySQL Reference Manual, which
116 may already be installed locally and which is also available online at
117 http://dev.mysql.com/doc/.
118
120 Sun Microsystems, Inc. (http://www.mysql.com/).
121
122
123
124MySQL 5.1 04/06/2010 MYSQL_CONFIG(1)