3

I use mysql-client 5.55.9999 and I would like to know how to prevent the mysql-client to save passwords to ~/.mysql_history? Let's say, I create a new user:

CREATE USER "username"@"host" IDENTIFIED BY "thePassword";

This statement is being put exactly as it is into ~/.mysql_history. This is what I don't want. I remember in earlier versions of mysql-client, rows including passwords have not been put into the history file, but I don't remember what the exact option in the settings was.

manifestor
  • 1,352
  • 6
  • 19
  • 34
  • Which version are you using? The feature is already implemented in 5.6.8, see https://dev.mysql.com/doc/refman/5.6/en/mysql-logging.html – Progman Apr 21 '18 at 11:02
  • ok, but how do I disable that for `mysql-client 5.55.9999`? – manifestor Apr 21 '18 at 11:30
  • As state in the documentation, as well in the one for version 5.5 (https://dev.mysql.com/doc/refman/5.5/en/mysql-logging.html), you can disable the login all together to create a symlink to `/dev/null`. – Progman Apr 21 '18 at 11:37
  • yes I know that I can symlink to `/dev/null`, but then I loose the whole history, I don't want that :) – manifestor Apr 21 '18 at 11:46

0 Answers0