What happens when you use the PASSWORD() function to insert a
password hash into a table?
- The hash will be written to the table
- The password might be written in clear text to the binlog
- The password might be written in clear text to the general log
- The password might be written in clear text to the slow query log
The query
mysql [localhost] {msandbox} (test) > INSERT INTO testpwd(pwd) VALUES(PASSWORD('secret_password'));
Query OK, 1 row affected (0.00 sec)
The General log
130128 16:04:41 1 Query INSERT INTO testpwd(pwd) VALUES(PASSWORD('secret_password'))
The Slow query log
# Time: 130128 16:04:41[Read more]
# User@Host: msandbox[msandbox] @ localhost []
# Query_time: 0.004887 Lock_time: 0.001043 Rows_sent: 0 Rows_examined: 0
SET …