I am passing the password to a mysql connection via a script using :
mysql -u root -p'mypass'
so I can execute task on that line using --execute.
I have seen in many stackexchange forums that passing password through command line is highly not recommended due to ps sniffing. So I am trying to see if I can indeed grab the mysql password just viewing the processes running. The only thing I was able to do was this:
ps -p 4034 -o command
but the answer I am getting is:
COMMAND
mysql -u root -px xxxxxxxxxx
(mysql running on 4034 pid) It looks that the system 'encrypts' the password by default. So my question is, is it really possible to grab passwords as parameters through command line?