Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
generate mysql passwords quickly
require 'keepass/password'
10.times do
password = KeePass::Password.generate('[Adbp]{20}', :remove_lookalikes => true);
p password
p `mysql -e 'select password("#{password}")\G'`.match(/\*(\w+)/)[1]
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.