You are currently viewing Can’t connect to mysql server [solution]

Can’t connect to mysql server [solution]

Here is one of the most common problem faced while using MySQL workbench in the initial phases while you are learning.

In this Article, We will guide you how you can over come such problem. Screenshot below shows what error you might be facing.

If you are facing this problem you can continue reading this article for solution.
When you install MYSQL and launch it, it seems to work fine at that moment, but when yu close it and launch it again, The server does not start and you will not be able to create schema or perform any operations on the database.
This is because your Windows Services is made in such a way that when you install any third party software, The Background services that needs to run a software is by default set to manual. So when you close the application and run it again, back ground service is not up.

You need to turn on the background services manually and you need to set in such a way that you don’t have to turn on manually every-time you restart the system. Lets see Step by Step

Step 1: Right Click on the task-bar and open Task manager.

Step 2: Once Task manager opens click on services tab highlighted in yellow.

Step 3: At the bottom of the services tab, you can see “Open Services” link. Click on the link.

 Step 4: Search for service MYSQL and double click on it.

Step 5: In the next popup that opens, select Startup Type to Automatic and click on Apply and OK button.

Step 6: 
After Click on the OK Button in Step 5, you will see a “Start the service” link on the left side of the screen. Click on Start.

Step 7: After Clicking on the Start, you will see three more options at the place of start button.
This means that your MySQL server is running in the background.

Step 8: Close the tabs of Task manager and go to MySQL workbench and refresh. you will be able to see your Schema and you will be able to perform database operations.
Note: If anything is still unclear then refer this video, Its a Step by Step guide to resolve.

Leave a Reply