Manual:Mysql.php

Details
The mysql.php maintenance script executes the MySQL client binary by connecting to the wiki's database. It takes credentials from LocalSettings.php and gets you into the MySQL client binary.

Getting into MySQL client with cluster
If you use a database cluster to run your wiki with $wgExternalServers. You can checkout to cluster.

Common error
This error occurs when an invalid or non-existent cluster name is given to the script.
 * Error: invalid cluster

This error occurs when you run the script on a wiki that uses sqlite.
 * Error: this script only works with MySQL/MariaDB