mysql, The Command-line Tool
mysqladmin, Administrating a MySQL Server
mysqlbinlog, Executing the queries from a binary log
mysqlcheck for Table Maintenance and Crash Recovery
mysqldump, Dumping Table Structure and Data
mysqlhotcopy, Copying MySQL Databases and Tables
mysqlimport, Importing Data from Text Files
mysqlshow, Showing Databases, Tables, and Columns
mysql_config, Get compile options for compiling clients
perror, Explaining Error Codes
mysql_config, Get compile options for compiling clients
mysql_config provides you with useful information how to compile
your MySQL client and connect it to MySQL.
mysql_config supports the following options:
--cflags
--libs
--socket
--port
--version
--libmysqld-libs
If you execute mysql_config without any options it will print
all options it supports plus the value of all options:
shell> mysql_config
sage: /usr/local/mysql/bin/mysql_config [OPTIONS]
Options:
--cflags [-I'/usr/local/mysql/include/mysql']
--libs [-L'/usr/local/mysql/lib/mysql' -lmysqlclient -lz -lcrypt -lnsl -lm -L/usr/lib -lssl -lcrypto]
--socket [/tmp/mysql.sock]
--port [3306]
--version [4.0.8-gamma]
--libmysqld-libs [ -L'/usr/local/mysql/lib/mysql' -lmysqld -lpthread -lz -lcrypt -lnsl -lm -lpthread -lrt]
You can use this to compile a MySQL client by as follows:
CFG=/usr/local/mysql/bin/mysql_config sh -c "gcc -o progname `$CFG --cflags` progname.c `$CFG --libs`"