{
    "mode": "man",
    "parameter": "mysql_config",
    "section": "1",
    "url": "https://www.chedong.com/phpMan.php/man/mysql_config/1/json",
    "generated": "2026-05-30T05:15:19Z",
    "synopsis": "mysqlconfig options",
    "sections": {
        "NAME": {
            "content": "mysqlconfig - display options for compiling clients\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "mysqlconfig options\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "mysqlconfig provides you with useful information for compiling your MySQL client and\nconnecting it to MySQL. It is a shell script, so it is available only on Unix and Unix-like\nsystems.\n\nNote\npkg-config can be used as an alternative to mysqlconfig for obtaining information such\nas compiler flags or link libraries required to compile MySQL applications. For more\ninformation, see Building C API Client Programs Using pkg-config[1].\n\nmysqlconfig supports the following options.\n\n•   --cflags C Compiler flags to find include files and critical compiler flags and defines\nused when compiling the libmysqlclient library. The options returned are tied to the\nspecific compiler that was used when the library was created and might clash with the\nsettings for your own compiler. Use --include for more portable options that contain only\ninclude paths.\n\n•   --cxxflags Like --cflags, but for C++ compiler flags.\n\n•   --include Compiler options to find MySQL include files.\n\n•   --libs Libraries and options required to link with the MySQL client library.\n\n•   --libsr Libraries and options required to link with the thread-safe MySQL client\nlibrary. In MySQL 8.0, all client libraries are thread-safe, so this option need not be\nused. The --libs option can be used in all cases.\n\n•   --plugindir The default plugin directory path name, defined when configuring MySQL.\n\n•   --port The default TCP/IP port number, defined when configuring MySQL.\n\n•   --socket The default Unix socket file, defined when configuring MySQL.\n\n•   --variable=varname Display the value of the named configuration variable. Permitted\nvarname values are pkgincludedir (the header file directory), pkglibdir (the library\ndirectory), and plugindir (the plugin directory).\n\n•   --version Version number for the MySQL distribution.\n\nIf you invoke mysqlconfig with no options, it displays a list of all options that it\nsupports, and their values:\n\n$> mysqlconfig\nUsage: /usr/local/mysql/bin/mysqlconfig [options]\nOptions:\n--cflags         [-I/usr/local/mysql/include/mysql -mcpu=pentiumpro]\n--cxxflags       [-I/usr/local/mysql/include/mysql -mcpu=pentiumpro]\n--include        [-I/usr/local/mysql/include/mysql]\n--libs           [-L/usr/local/mysql/lib/mysql -lmysqlclient\n-lpthread -lm -lrt -lssl -lcrypto -ldl]\n--libsr         [-L/usr/local/mysql/lib/mysql -lmysqlclientr\n-lpthread -lm -lrt -lssl -lcrypto -ldl]\n--plugindir      [/usr/local/mysql/lib/plugin]\n--socket         [/tmp/mysql.sock]\n--port           [3306]\n--version        [5.8.0-m17]\n--variable=VAR   VAR is one of:\npkgincludedir [/usr/local/mysql/include]\npkglibdir     [/usr/local/mysql/lib]\nplugindir     [/usr/local/mysql/lib/plugin]\n\nYou can use mysqlconfig within a command line using backticks to include the output that it\nproduces for particular options. For example, to compile and link a MySQL client program, use\nmysqlconfig as follows:\n\ngcc -c `mysqlconfig --cflags` progname.c\ngcc -o progname progname.o `mysqlconfig --libs`\n",
            "subsections": []
        },
        "COPYRIGHT": {
            "content": "Copyright © 1997, 2024, Oracle and/or its affiliates.\n\nThis documentation is free software; you can redistribute it and/or modify it only under the\nterms of the GNU General Public License as published by the Free Software Foundation; version\n2 of the License.\n\nThis documentation is distributed in the hope that it will be useful, but WITHOUT ANY\nWARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR\nPURPOSE. See the GNU General Public License for more details.\n\nYou should have received a copy of the GNU General Public License along with the program; if\nnot, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA\n02110-1301 USA or see http://www.gnu.org/licenses/.\n\n",
            "subsections": []
        },
        "NOTES": {
            "content": "1. Building C API Client Programs Using pkg-config\nhttps://dev.mysql.com/doc/c-api/8.0/en/c-api-building-clients-pkg-config.html\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "For more information, please refer to the MySQL Reference Manual, which may already be\ninstalled locally and which is also available online at http://dev.mysql.com/doc/.\n",
            "subsections": []
        },
        "AUTHOR": {
            "content": "Oracle Corporation (http://dev.mysql.com/).\n\n\n\nMySQL 8.0                                    12/13/2024                              MYSQLCONFIG(1)",
            "subsections": []
        }
    },
    "summary": "mysqlconfig - display options for compiling clients",
    "flags": [],
    "examples": [],
    "see_also": []
}