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 logs in to MySQL client.

Log in to MySQL client with cluster
If you use a database cluster to run your wiki with $wgExternalServers, you can use the  option to log in.

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