Unable to connect to any of the specified MySQL hosts
So , sometimes when we use mysql in the application , we can receive error while having mysql connection.
So the error "Unable to connect to any of the specified MySQL hosts" can come becauseof mysql services not working properly. So for fixing the issue we have to restart mysql services. You can follow these steps :
Step 1- Go to start type services.msc then click on it
Step 2 - Find the MySQL80 service
Step 3 - Right click on it and then click on start
Step 2 - Find the MySQL80 service
Step 3 - Right click on it and then click on start
Now try to run the application again where you were having error earlier and this time it will work. So this is how you can fix error "Unable to connect to any of the specified MySQL hosts" in mysql server.