Tool to match mysql password encryption I've created a user ... but forgotten the password


mysql> create user 'blayo'@'%' identified by 'right';


Which Linux command line tool can encrypt the password the same way mysql does ?


mysql> select Password,User from mysql.user
------------------------------------------+-------+
*920018161824B14A1067A69626595E68CB8284CB | blayo |


...to be sure I use the right one


$ tool right
*920018161824B14A1067A69626595E68CB8284CB
Just use MySQL:

select password('foo');

PASSWORD('FOO')

*F3A2A51A9B0F2BE2468926B4132313728C250DBF