faqts : Computers : Databases : MySQL

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

29 of 50 people (58%) answered Yes
Recently 5 of 10 people (50%) answered Yes

Entry

How do I find out the username and password of a database?

Feb 22nd, 2008 20:24
dman, Jason Ross, Douglas Tan, http://sturly.com


\u mysql
SELECT User, Password FROM User;
If the password is stored in an encrypted format, you will be unable to 
retrieve it. In that case you will need to reset it:
\u mysql
UPDATE User SET Password = password("newPass") WHERE User = userName;
NOTE: instead of using the password function, you may also use the md5 
function, which provides a better encryption routine.
=[ jason ]=