The SQL statement to show the current databases on the MySQL server code example Example 1: mysql list databases SHOW DATABASES; Example 2: mysql get db name SELECT DATABASE();