## Firewall Account Profile Functions 

Example: 

SELECT set_firewall_group_mode(’g’, ’DETECTING’); 

This function was added in MySQL 8.0.23. 

These functions perform management operations on firewall account profiles: 

• read_firewall_users( user , mode ) 

This aggregate function updates the firewall account profile cache through a SELECT  statement on the mysql.firewall_users  table. It requires the FIREWALL_ADMIN  privilege or the deprecated SUPER privilege. 

Example: 

SELECT read_firewall_users(’fwuser@localhost’, ’RECORDING’) FROM mysql.firewall_users; 

As of MySQL 8.0.26, this function is deprecated and subject to removal in a future MySQL version. See Migrating Account Profiles to Group Profiles. 

• read_firewall_whitelist( user , rule ) 

This aggregate function updates the recorded-statement cache for the named account profile through a SELECT  statement on the mysql.firewall_whitelist  table. It requires the FIREWALL_ADMIN privilege or the deprecated SUPER  privilege. 

Example: 

SELECT read_firewall_whitelist(’fwuser@localhost’, fw.rule) FROM mysql.firewall_whitelist AS fw WHERE USERHOST = ’fwuser@localhost’; 

As of MySQL 8.0.26, this function is deprecated and subject to removal in a future MySQL version. See Migrating Account Profiles to Group Profiles. 

• set_firewall_mode( user , mode ) 

This function manages the account profile cache and establishes the profile operational mode. It requires the FIREWALL_ADMIN  privilege or the deprecated SUPER  privilege. 

Example: 

SELECT set_firewall_mode(’fwuser@localhost’, ’RECORDING’); 

As of MySQL 8.0.26, this function is deprecated and subject to removal in a future MySQL version. See Migrating Account Profiles to Group Profiles. 

## Firewall Miscellaneous Functions 

These functions perform miscellaneous firewall operations: 

• mysql_firewall_flush_status() 

This function resets several firewall status variables to 0: 

