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