You are here : Cmysql/mysql.hmysql_shutdown

mysql_shutdown() - mysql/mysql.h

 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.NoteAs 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.mysql_shutdown()mysql_query()mysql_query()SHUTDOWNSHUTDOWNAsks 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.SHUTDOWNSHUTDOWNshutdown_levelSHUTDOWN_DEFAULTlibmysqlclientmysql_shutdown()mysql_shutdown()libmysqlclientAs of MySQL 5.7.9, an alternative to
        mysql_shutdown() is to use the
        SHUTDOWN SQL statement.mysql_shutdown()mysql_shutdown()SHUTDOWNSHUTDOWNThe shutdown process is described in
        Section 6.1.11, “The Server Shutdown Process”.Section 6.1.11, “The Server Shutdown Process”


Syntax

int mysql_shutdown(MYSQL *mysql, enum
        mysql_enum_shutdown_level shutdown_level)


Example

 


Output / Return Value

 Zero for success. Nonzero if an error occurred.


Limitations


Alternatives / See Also


Reference