On Monday 13 April 2009, 22:10, Mick wrote: > Hi All, > > I am not sure if I am alarming myself unnecessarily, but this is what > I observed: > > Login as e.g. mick; (this is a unix acccount) > mysql -u root -p > Enter password: XXXXXX > > mysql> GRANT ALTER, CREATE, CREATE TEMPORARY TABLES, CREATE VIEW, > INDEX, INSERT, SELECT, UPDATE ON database1.* TO > 'db_user1'@'localhost' IDENTIFIED BY 'passwd1'; > Query OK, 0 rows affected (0.00 sec) > > mysql> FLUSH PRIVILEGES; > Query OK, 0 rows affected (0.00 sec) > mysql>quit > > Now if I login into database1 as db_user1 and then press the up arrow > key at the mysql> prompt I end up seeing all the previous commands > that I ran as root, including the 'passwd1'!!!
Mysql history file is per-(unix)user, so each unix user has his own mysql history file in his home directory. If you login as mysql user db_user1 and see the statements you previously entered as mysql user root, that means you are using the same unix user for both. If there's a security issue, it's that one imho. If you want, you can disable mysql history using one of the techniques described here: http://doc.51windows.net/mysql/?url=/mysql/ch08s06.html see the last paragraph around the middle of the page, just before 8.6.2.