mysql_shutdown()
int mysql_shutdown(MYSQL *mysql)
Asks the database server to shutdown. The connected user must have shutdown privileges.
Zero for success. Non-zero if an error occurred.
CR_COMMANDS_OUT_OF_SYNC
CR_SERVER_GONE_ERROR
CR_SERVER_LOST
CR_UNKNOWN_ERROR