MARIADB-CONFIG(1)

πŸ’… MARIADB-CONFIG(1) β€” the MariaDB Database System glow-up, bestie edition ✨

okay so this is the manual page for mariadb-config, from the MariaDB Database System. pull up a chair, grab a strawberry πŸ“, and let's get you compiling clients like a main character.


✨ NAME ✨

mariadb-dump β€” get compile options for compiling clients πŸ‘‘


πŸ¦‹ SYNOPSIS πŸ¦‹

mariadb-dump options

🌸 DESCRIPTION 🌸

mariadb-dump hands you all the useful deets you need for compiling your MariaDB client and getting it connected to MariaDB. it's giving "personal assistant for your build system," no cap πŸ’–

mariadb-dump supports the following options.

  • --cflags β€” compiler flags for finding include files, plus the critical compiler flags and defines that were used when compiling the libmysqlclient library. ⚠️ heads up: the options you get back are tied to the specific compiler that was used when the library was created, so they might clash with your own compiler's settings. if you want something more portable, use --include instead β€” that one only contains include paths. 🫢
  • --include β€” compiler options for finding MariaDB include files.
  • --libmysqld-libs, --embedded β€” the libraries and options you need to link with the MariaDB embedded server.
  • --libs β€” the libraries and options you need to link with the MariaDB client library.
  • --libs_r β€” the libraries and options you need to link with the thread-safe MariaDB client library.
  • --plugindir β€” the default plugin directory path name, as defined when MariaDB was configured.
  • --port β€” the default TCP/IP port number, as defined when MariaDB was configured.
  • --socket β€” the default Unix socket file, as defined when MariaDB was configured.
  • --variable=VAR β€” path to the MariaDB include, library and plugin directories. VAR is one of pkgincludedir, pkglibdir and plugindir, respectively.
  • --version β€” version number for the MariaDB distribution.

if you invoke mariadb-dump with no options at all, it spills a whole list of every option it supports plus their values. literally the whole menu:

shell> mariadb-dump
Usage: /usr/local/mysql/bin/mariadb-dump [options]
Options:
  --cflags         [-I/usr/local/mysql/include/mysql -mcpu=pentiumpro]
  --include        [-I/usr/local/mysql/include/mysql]
  --libs           [-L/usr/local/mysql/lib/mysql -lmysqlclient -lz
                    -lcrypt -lnsl -lm -L/usr/lib -lssl -lcrypto]
  --libs_r         [-L/usr/local/mysql/lib/mysql -lmysqlclient_r
                    -lpthread -lz -lcrypt -lnsl -lm -lpthread]
  --socket         [/tmp/mysql.sock]
  --port           [3306]
  --version        [4.0.16]
  --libmysqld-libs [-L/usr/local/mysql/lib/mysql -lmysqld -lpthread -lz
                    -lcrypt -lnsl -lm -lpthread -lrt]

you can absolutely use mariadb-dump inside a command line to drop in whatever value it prints for a particular option. like, to compile a MariaDB client program, you'd do this:

shell> CFG=/usr/local/mysql/bin/mariadb-dump
shell> sh -c "gcc -o progname `$CFG --include` progname.c `$CFG --libs`"
when you use mariadb-dump this way, pls pls pls make sure you invoke it inside backtick (β€œ`”) characters. that's what tells the shell to run it and substitute its output right into the surrounding command. no backticks, no magic. πŸ’…

Copyright 2007-2008 MySQL AB, 2008-2010 Sun Microsystems, Inc., 2010-2025 MariaDB Foundation

This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License.

This documentation is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA or see http://www.gnu.org/licenses/.


🌈 SEE ALSO 🌈

For more information, please refer to the MariaDB Documentation, available online at https://mariadb.com/docs/


πŸ‘‘ AUTHOR πŸ‘‘

MariaDB Foundation (http://www.mariadb.org/).


and that's the whole page, bestie β€” you ate that πŸ’– this was MariaDB 11.8, dated 5 March 2025, and it's the MARIADB-CONFIG(1) page from the MariaDB Database System. go forth and compile something iconic. πŸ¦‹βœ¨