If you are the root user then it will display all the databases on the server, but if your not the root user then it will show all the databases that your user has permissions for. It's a really fun to play around with and can be expanded in a variety of ways. It's explained in the comments.