sql server 2008/2005
SELECT name, CAST(password AS varbinary(max)) AS PasswordHash FROM sys.syslogins 或者 SELECT name,sys.fn_varbintohexstr(CAST(password AS varbinary(max))) FROM sys.syslogins
爆破参见:http://stackoverflow.com/questions/173329/how-to-decrypt-a-password-from-sql-server
mysql:
select user,host,password from mysql.user