Name

mysql_reload —

Synopsis

int mysql_reload(MYSQL *mysql)

Reloads the permission tables on the MySQL database server. You must have Reload permission on the current connection to use this function. If the operation is successful, 0 is returned; otherwise, a nonzero value is returned.

Tip

This function is deprecated and will be removed in a future version of the API. The same functionality can be obtained by using the SQL query FLUSH PRIVILEGES.

Example

/* Make some changes to the grant tables... */
result = mysql_reload(&mysql);
/* The changes now take effect... */

Get Managing & Using MySQL, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.