Wednesday 8 January 2014

List all users and passwords in MySql on OSX

If you want to list all the users and their passwords in MySql on OSX, type the following on Terminal :

In the mysql prompt:

mysql> select user, password from mysql.user;

The above command will display the entire list of Mysql users and their encrypted passwords in a tabulated format.


Note that, since the default encryption is not considered safe enough, it is often advised to use MD5 or SHA1 encryption. We will cover that topic in another post.



No comments:

Post a Comment

Related Posts Plugin for WordPress, Blogger...
eXTReMe Tracker