There isn't a record, and passwords are hard to decrypt. If you entered a password on the command-line, that might be retrievable (but you probably would have found that, using grep
).
Further reading:
Мне нужно найти пароль пользователя SQL, я не могу его сбросить.
Все, что я знаю, это то, что существует файл истории MySQL, содержащий эту информацию о Ubuntu 12.04
There isn't a record, and passwords are hard to decrypt. If you entered a password on the command-line, that might be retrievable (but you probably would have found that, using grep
).
Further reading:
If the password was entered while starting MySQL from a shell prompt, you may, as an alternative place to check, be able to find it in the Bash history file for the user's acount, which is .bash_history
in the user's home directory. E.g., if the user entered the command below:
$ mysql --user=users_acct --password=users_password
If you viewed the contents of the Bash history file for that user's account you would see the command with the password just as you would see other commands entered from the user's account. E.g., if the user's account was jdoe:
# grep mysql ~jdoe/.bash_history mysql --user=users_account --password=users_password
But, if the user entered the command mysql -u users_acct -p
and didn't follow the -p
or --password
with the password, but instead just entered one of those parameters without putting the password immediately after it then the system will prompt for the password and it won't be in the Bash history file.