Documentation Home
MySQL 5.7 Reference Manual
Related Documentation Download this Manual
PDF (US Ltr) - 33.9Mb
PDF (A4) - 34.0Mb
PDF (RPM) - 33.2Mb
EPUB - 8.5Mb
HTML Download (TGZ) - 8.2Mb
HTML Download (Zip) - 8.2Mb
HTML Download (RPM) - 7.1Mb
Eclipse Doc Plugin (TGZ) - 9.0Mb
Eclipse Doc Plugin (Zip) - 11.1Mb
Man Pages (TGZ) - 219.4Kb
Man Pages (Zip) - 322.3Kb
Info (Gzip) - 3.2Mb
Info (Zip) - 3.2Mb
Excerpts from this Manual

24.8.7.71 mysql_shutdown()

int mysql_shutdown(MYSQL *mysql, enum mysql_enum_shutdown_level shutdown_level)

Description
Note

As of MySQL 5.7.9, mysql_shutdown() is deprecated and will be removed in a future version of MySQL. Instead, use mysql_query() to execute a SHUTDOWN statement.

Asks the database server to shut down. The connected user must have the SHUTDOWN privilege. MySQL servers support only one type of shutdown; shutdown_level must be equal to SHUTDOWN_DEFAULT. Dynamically linked executables which have been compiled with older versions of the libmysqlclient headers and call mysql_shutdown() need to be used with the old libmysqlclient dynamic library.

As of MySQL 5.7.9, an alternative to mysql_shutdown() is to use the SHUTDOWN SQL statement.

The shutdown process is described in Section 5.1.12, “The Server Shutdown Process”.

Return Values

Zero for success. Nonzero if an error occurred.

Errors

User Comments
  Posted by Chuck Han on October 8, 2004
This comment applies particularly to building mysql++ under Windows for MySQL v5.0.x. If you get an error that in connection.cc, the include file config.h cannot be found, simply comment the include line for config.h out.

I have seen other comments that you should replace the include line with:

#define HAVE_MYSQL_SHUTDOWN_LEVEL_ARG

but, that allows the condition:

# define SHUTDOWN_ARG ,SHUTDOWN_DEFAULT

to be processed, and that generates the error that SHUTDOWN_DEFAULT is undefined.

Chuck

Sign Up Login You must be logged in to post a comment.