1MYSQL_CONFIG(1)              MySQL Database System             MYSQL_CONFIG(1)
2
3
4

NAME

6       mysql_config - display 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. It is a shell script, so it is
14       available only on Unix and Unix-like systems.
15
16           Note
17           pkg-config can be used as an alternative to mysql_config for
18           obtaining information such as compiler flags or link libraries
19           required to compile MySQL applications. For more information, see
20           Building C API Client Programs Using pkg-config[1].
21
22       mysql_config supports the following options.
23
24       ·   --cflags C Compiler flags to find include files and critical
25           compiler flags and defines used when compiling the libmysqlclient
26           library. The options returned are tied to the specific compiler
27           that was used when the library was created and might clash with the
28           settings for your own compiler. Use --include for more portable
29           options that contain only include paths.
30
31       ·   --cxxflags Like --cflags, but for C++ compiler flags.
32
33       ·   --include Compiler options to find MySQL include files.
34
35       ·   --libs Libraries and options required to link with the MySQL client
36           library.
37
38       ·   --libs_r Libraries and options required to link with the
39           thread-safe MySQL client library. In MySQL 8.0, all client
40           libraries are thread-safe, so this option need not be used. The
41           --libs option can be used in all cases.
42
43       ·   --plugindir The default plugin directory path name, defined when
44           configuring MySQL.
45
46       ·   --port The default TCP/IP port number, defined when configuring
47           MySQL.
48
49       ·   --socket The default Unix socket file, defined when configuring
50           MySQL.
51
52       ·   --variable=var_name Display the value of the named configuration
53           variable. Permitted var_name values are pkgincludedir (the header
54           file directory), pkglibdir (the library directory), and plugindir
55           (the plugin directory).
56
57       ·   --version Version number for the MySQL distribution.
58
59       If you invoke mysql_config with no options, it displays a list of all
60       options that it supports, and their values:
61
62           shell> mysql_config
63           Usage: /usr/local/mysql/bin/mysql_config [options]
64           Options:
65             --cflags         [-I/usr/local/mysql/include/mysql -mcpu=pentiumpro]
66             --cxxflags       [-I/usr/local/mysql/include/mysql -mcpu=pentiumpro]
67             --include        [-I/usr/local/mysql/include/mysql]
68             --libs           [-L/usr/local/mysql/lib/mysql -lmysqlclient
69                               -lpthread -lm -lrt -lssl -lcrypto -ldl]
70             --libs_r         [-L/usr/local/mysql/lib/mysql -lmysqlclient_r
71                               -lpthread -lm -lrt -lssl -lcrypto -ldl]
72             --plugindir      [/usr/local/mysql/lib/plugin]
73             --socket         [/tmp/mysql.sock]
74             --port           [3306]
75             --version        [5.8.0-m17]
76             --variable=VAR   VAR is one of:
77                     pkgincludedir [/usr/local/mysql/include]
78                     pkglibdir     [/usr/local/mysql/lib]
79                     plugindir     [/usr/local/mysql/lib/plugin]
80
81       You can use mysql_config within a command line using backticks to
82       include the output that it produces for particular options. For
83       example, to compile and link a MySQL client program, use mysql_config
84       as follows:
85
86           gcc -c `mysql_config --cflags` progname.c
87           gcc -o progname progname.o `mysql_config --libs`
88
90       Copyright © 1997, 2020, Oracle and/or its affiliates.
91
92       This documentation is free software; you can redistribute it and/or
93       modify it only under the terms of the GNU General Public License as
94       published by the Free Software Foundation; version 2 of the License.
95
96       This documentation is distributed in the hope that it will be useful,
97       but WITHOUT ANY WARRANTY; without even the implied warranty of
98       MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
99       General Public License for more details.
100
101       You should have received a copy of the GNU General Public License along
102       with the program; if not, write to the Free Software Foundation, Inc.,
103       51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see
104       http://www.gnu.org/licenses/.
105
106

NOTES

108        1. Building C API Client Programs Using pkg-config
109           https://dev.mysql.com/doc/c-api/8.0/en/c-api-building-clients-pkg-config.html
110

SEE ALSO

112       For more information, please refer to the MySQL Reference Manual, which
113       may already be installed locally and which is also available online at
114       http://dev.mysql.com/doc/.
115

AUTHOR

117       Oracle Corporation (http://dev.mysql.com/).
118
119
120
121MySQL 8.0                         11/26/2020                   MYSQL_CONFIG(1)
Impressum