MySQL SUPER privilege vs. log_bin_trust_function_creators

MySQL

With binary logging turned on for replication is it better to grant a user SUPER privilege when he/she is defining a stored procedure or UDF or is it better to set log_bin_trust_function_creators = 1 so the SUPER privilege is not required.

I have chosen the 2nd alternative but what is the "standard practice"?

Best Answer

My preference is to set log_bin_trust_function_creators = 1 to avoid handing out the SUPER priviledge when it's not required for any other functionality. Appropriate permissions help protect against unknown SQL injection (i.e. user attempts to DROP TABLE) or theft of credentials.

Amazon RDS users must also use the second option as RDS does not allow the SUPER priviledge. There is an excellent write up on how to set the log_bin_trust_function_creators property on RDS instances here.