After reading multiple questions of users with problems like:
- forgot password
- installed multiple instances of MySQL
- forgot to start MySQL
- etc. etc
I started to consider if it is actually possible to conclude from the error page if MySQL is running at all?
Questions with the same type of answers:
- mysql said: Cannot connect: invalid settings. xampp
- phpMyAdmin - can't connect - invalid setings - ever since I added a root password - locked out
- MySQL Says: Cannot connect: invalid settings
But does the error page actually say this is a mysql server response or it couldn't connect (server isn't running for instance)
Take the following code:
<?php
//Step1
$db = mysqli_connect('localhost','username','password','database_name')
or die('Error connecting to MySQL server.');
?>
If one of the inputs is incorrect you will get the error:
Error connecting to MySQL server.
This could be modified into a nice looking error message (as the image above).
So does the error actually prove that MySQL is running or not?