abg / dbsake

Collection of mysql tools

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

sandbox.sh mysql shell should log to alternate history file

abg opened this issue · comments

Right now ./sandbox.sh mysql will log to ~/.mysql_history. This is annoying when using MySQL 5.6 sandbox but MariaDB (or an older MySQL) system distribution. MySQL 5.6 clobber the entire history with libeditline and you end up with garbage "\040" separators in your mysql shell history :(

This can be done by setting the MYSQL_HISTFILE environment variable per the documentation here:

http://dev.mysql.com/doc/refman/5.6/en/mysql-logging.html

This seems to hold true going back to at least MySQL 5.0 (i.e. all supported dbsake targets).