Sometimes I look through my MySQL logs and I stumble upon some AES_ENCRYPT/AES_DECRYPT requests showing the password in plaintext.
If I create the logs inside PHP I would be able to delete them.
But what about MySQL general/slow query logs. Is their an option available or is it possible to set a mySQL variable that won’t be saved in the logs?
Unfortunately, I know of no way to disable MySQL logging for individual statements. The MySQL documentation advises to keep the logs secured for this reason:
From 5.2.3. The General Query Log
Unfortunately, that (since 5.6.3) inbuilt anti-password-logging goes only for the MySQL PASSWORD() function.
I see a few possible solutions for your problem: