Hi, Felipe!

On Aug 10, Felipe Gasper wrote:
> Hi all,
> 
> What is the best way to fetch a user’s password hash? I’d ideally like
> something that works in both MySQL and MariaDB, as many versions as
> possible.
> 
> Thank you!

You can select from mysql.user. You can use IF() function to create a
select that returns a password no matter what column it's in.

It'd be the most universal way, I think.

There're also SHOW GRANTS and SHOW CREATE USER, but they output is
version dependent and might have weird privilege requirements to see the
password.

Regards,
Sergei
Chief Architect MariaDB
and [email protected]

_______________________________________________
Mailing list: https://launchpad.net/~maria-discuss
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~maria-discuss
More help   : https://help.launchpad.net/ListHelp

Reply via email to