mysql get list of database code example Example 1: mysql get db name SELECT DATABASE(); Example 2: how to see database in mysql command line mysql -u user -p