Easy fix to “Can’t connect to MySQL server on ‘ localhost(3306)”
While we use MySQL on our computers, we come across “Can’t connect to MySQL server on ‘ localhost(3306)” regularly. Whenever this happens, the program is unable to access the MySQL command client and the local server to extract data for our project use. The primary reason for this issue is that the MySQL server might not be running on your computer. In this article, we will show you how to fix this error.
How to start MySQL server on your computer
- Right-click on your taskbar and open Task Manager.
- Head on to the Services tab. Scroll down and look for MySQL.
- Right-click on it and go “Open Services.”
- Again scroll down and look for MySQL.
- Right-click on it and go to “Properties.”
- In the properties Dialog box, go under the General tab.
- Make sure to switch the start-up type to “Automatic.”
- Click on Start open below Service Status.
Your MySQL server is now up and running on your computer, and you won’t need to worry about it as it will automatically get started.
I hope your problem has been resolved, and you can continue working with MySQL without any issues.