You may accidentally see a hidden mysql file named. mysql_history in the/root directory, because you have never noticed it before. Open it and see what it is. This file records all the operations on connecting to mysql, including creating a user and changing the user's plaintext and password. This is enough. in case of an attack, the database will not die! The query results show that this file is configured by default when MySQL is compiled and installed, and it does not seem easy to modify. But it is best not to keep this file. Otherwise, it will be stolen and the consequences will be disastrous. It is not feasible to delete it here. You must connect it to the garbage bin directly:
Shell> ln-s/dev/null ~ /. Mysql_history
What should I do if I want to record some mysql operations? If you want to record the operation behavior, you can. in the "client" group under the cnf file, add tee =/tmp/mysql temporarily. history. comment it out after the operation is complete.
Note: After the tee command is added, you do not need to restart the database. Therefore, it is very convenient to configure a record for a certain operation.