mysqladmin list databases code example Example 1: mysql list databases SHOW DATABASES; Example 2: mysql get db name SELECT DATABASE();