content_image/709343.jpg
## 4.7 Program Development Utilities 

Display only the first N  queries in the output. 

## • --verbose , -v 

Verbose mode. Print more information about what the program does. 

This section describes some utilities that you may find useful when developing MySQL programs. 

In shell scripts, you can use the my_print_defaults  program to parse option files and see what options would be used by a given program. The following example shows the output that my_print_defaults might produce when asked to show the options found in the [client]  and [mysql]  groups: 

shell> my_print_defaults client mysql --port=3306 --socket=/tmp/mysql.sock --no-auto-rehash 

Note for developers: Option file handling is implemented in the C client library simply by processing all options in the appropriate group or groups before any command-line arguments. This works well for programs that use the last instance of an option that is specified multiple times. If you have a C or C++ program that handles multiply specified options this way but that doesn’t read option files, you need add only two lines to give it that capability. Check the source code of any of the standard MySQL clients to see how to do this. 

Several other language interfaces to MySQL are based on the C client library, and some of them provide a way to access option file contents. These include Perl and Python. For details, see the documentation for your preferred interface. 

## 4.7.1 mysql_config — Display Options for Compiling Clients 

mysql_config  provides you with useful information for compiling your MySQL client and connecting it to MySQL. It is a shell script, so it is available only on Unix and Unix-like systems. 

<img src='content_image/709343.jpg'>

mysql_config  supports the following options. 

## • --cflags 

Note 

pkg-config  can be used as an alternative to mysql_config  for obtaining information such as compiler flags or link libraries required to compile MySQL applications. For more information, see Building C API Client Programs Using pkg- config. 

C Compiler flags to find include files and critical compiler flags and defines used when compiling the libmysqlclient  library. The options returned are tied to the specific compiler that was used when the library was created and might clash with the settings for your own compiler. Use --include  for more portable options that contain only include paths. 

## • --cxxflags 

Like --cflags , but for C++ compiler flags. 

## • --include 

