mysql_config: Check how MySql is configured
Posted by Joys of Programming on in C/C++
mysql_config is a command line tool to find how your mysql is configured. It is useful to find out the information like the mysql socket.
$ mysql_config Usage: ./mysql_config [OPTIONS] Options: --cflags [-I/usr/local/mysql/include -g -Os -arch i386 -fno-common -D_P1003_1B_VISIBLE -DSIGNAL_WITH_VIO_CLOSE -DSIGNALS_DONT_BREAK_READ -DIGNORE_SIGHUP_SIGQUIT -DDONT_DECLARE_CXA_PURE_VIRTUAL] --include [-I/usr/local/mysql/include] --libs [-L/usr/local/mysql/lib -lmysqlclient -lz -lm -lmygcc] --libs_r [-L/usr/local/mysql/lib -lmysqlclient_r -lz -lm -lmygcc] --plugindir [/usr/local/mysql/lib/plugin] --socket [/tmp/mysql.sock] --port [0] --version [5.1.42] --libmysqld-libs [-L/usr/local/mysql/lib -lmysqld -ldl -lz -lm -lmygcc]
If you want to program with mysql libraries in C/C++, the above information on the libraries are quite useful.
For information on mysql sockets, you can run the above command in this way
$ mysql_config --socket /tmp/mysql.sock
Using this information, I was able to configure mysql, php and apache.
Comments: