Current mysql.ping UserParameter fails if mysql is listening but you cannot login. mysql.ping check can also look at returncode, as per manpage mysqladmin:
Check whether the server is available. The return status from mysqladmin is 0 if the server is running, 1 if it
is not. This is 0 even in case of an error such as Access denied, because this means that the server is running
but refused the connection, which is different from the server not running.
If you do this you can check if mysql is running even when you don;t have credentials.