MySQL Workbench 5.2 CE, Windows 7, "Can't connect to MySQL Server on 127.0.0.1 (10061)"
Asked Answered
S

15

13

I've seen this problem asked a bunch of times on here but every solution posted hasn't been helpful for me.

I just got the x86 install and installed MySQL Workbench 5.2 CE on my Computer.

After that I tried to create a New Server Instance or New Connection using localhost as the hostname, I've tried Port 3306 (and trying no port) and not putting a password for root or Default Schema.

I get the error message "Can't connect to MySQL server on '127.0.0.1' (10061)" both times.

I read a possible problem is that the MySQL Server isn't running so I tried looking for mysqld in my MySQL Workbench 5.2 CE folder but it isn't there (there isn't a bin folder either).

It's frustrating since all I want to do is create a small application that connects to MySQL Workbench for a school project (though I may use MySQL later on).

Any help would be very much appreciated. Thanks.

Scintillometer answered 21/6, 2013 at 2:59 Comment(0)
H
24

I had the same problem and solved it as follows.

  1. Search for 'Services' in the Windows Search Bar.
  2. Click on 'Services', which should be the only hit.
  3. Scroll down to 'MySQL56'.
  4. Right-click on this item and hit 'Start' or 'Restart'.

That's it! Easy as pie.

Hooks answered 24/2, 2014 at 19:30 Comment(0)
M
11

It is indeed the case that your MySQL Server isn't running. bin is not in Workbench, its in MySQL Server directory. To start the MySQL Server ( I am assuming default installation path).

Open command prompt. Navigate to MySQL server directory using command prompt.

C:\cd Program Files\MySQL\MySQL Server 5.X\bin

Once inside bin type in:

C:\Program Files\MySQL\MySQL Server 5.X\bin :> mysqld --console

The SQL Server will start-up. Do not close this command prompt. Use Workbench utilities as you usually do in another command prompt.

If this doesn't work make sure you have MySQL Server installed on your system as Workbench is just a front end.

Multicolored answered 21/6, 2013 at 4:53 Comment(2)
Is there no way to run it in the background?Asocial
Check the post by @user2932774 below. See if that helps you out.Multicolored
P
4

I had the same problem.

The problem is you installed the Workbench but not the Server. Moreover you have to configure the server first before you can connect to it.

Long story short: Install this installer: http://dev.mysql.com/downloads/windows/installer/

Check everything/install all options and you will be guided through a wizard. You can set up a root username and a password and you are ready to go to use the Workbench.

Uninstall whatever you have installed so far.

Polysyllabic answered 9/9, 2014 at 20:31 Comment(0)
H
2

if you have used msi installer or exe to install mysql in windows, you can start the service from services.msc

if you have just unzipped mysql from somewhere, service won't be available to start from services.msc. In this case start the server using mysqld.exe

Hypothetical answered 24/7, 2014 at 3:4 Comment(0)
P
1

Like this.

  1. $ sudo vim /etc/mysql/my.cnf

  2. #bind-address = XXX.XXX.XXX.XXX

enter image description here

Photoflood answered 7/11, 2014 at 8:58 Comment(0)
N
1

I had the same Problem.

I think the Problem showed because I did not create a specific user for the Database during the configuration while installing everything. Thought i could do it later. I only entered a server password.

After re-installation and creating an user during the installation everything works now.

Normandnormandy answered 1/6, 2015 at 13:0 Comment(0)
F
1

I had the same issue on my laptop install (running windows 8.1) and my desktop (running windows 7). Both are 64bit.

I had not used MySQL workbench on either system for over a year they were updated from versions 5.1 and 5.4 to MySQL Workbench V6.3CE I never did get the newer 6.3 version to update after countless hours researching potential known compatibility issues, any update release issues ect. (note: V6.3 ce did work on both systems the last time they were used so I was really baffled at what had happened.

Here is what I did to solve the issue and get up and running with MySQL Server and MySQL Workbench.

-Backed up all db schemas
-Deleted MySQl WorkBench and any versions of MySQL Server vX.x via the control panel
-Deleted the ALL associated folders from C:\Program Files, from C:\Program Files (x86), from C:\ProgramData (-this is a hidden file) (This is the only complete uninstall)
-Go to Control Panel> System> Administrative > Services and look for your MySQL instance to be sure it's no listed. If it is you still have files and/or folders on your hard drive that need to be deleted and it may still be Running.
-Run CMD as administrator [ C:\Windows\System32> ]
use statement: Net MYSQL
and then statement: sc delete
This deletes all installs of MYSQl Server.
-Restart
-Re- Install I chose to use the earlier versions (MySQL Server 5.4 beta) first so that the config wizard runs and (MySql Workbench 5.2 CE) only because I wanted to get it up and running to create a restore point before any upgrade.
After all of that I have both systems running and connecting with no errors, I was able to create my user accounts and adjust privileges during the connection creations. I assume at some point I will have to upgrade but not until this no longer works. Hope this helps as a one stop answer ( I visited at least 20 different topics nailed down what was missing from the previous upgrade installs.

Fleisher answered 29/8, 2015 at 2:16 Comment(0)
E
1

Following command worked for me. Try it:

C:\wamp\bin\mysql\mysql5.6.17\bin\mysqld.exe --console

you should find mysqld.exe in your computer and then run it manually.

Elagabalus answered 16/4, 2016 at 1:2 Comment(0)
B
0

I had the same problem and i solved

In my case.

While i am installing the software in configuration phase i selected development machine instead of server so that i got the problem.

So i uninstalled the mysqlinstaller and try delete all it's files in c:program files\mysql Reinstalled the mysqlinstaller this time i selected "server" so that problem solved.

Note: If anyone couldn't solve the same problem by above solutions except mine try to do the same as i done. Because in services i couldn't find mysql55 service and i couldn't locate some files in cmd.

Bishop answered 23/8, 2014 at 10:30 Comment(0)
S
0

Go to C:\cd Program Files\MySQL\MySQL Server 5.X\bin directory and run file "MySQLInstanceConfig.exe"

and set port to 10061

Sudor answered 27/12, 2014 at 11:59 Comment(0)
B
0

you might download and install mysql installer, which solved the same problem I had, link to download installer: http://dev.mysql.com/downloads/installer/

Bishop answered 30/9, 2015 at 12:36 Comment(0)
E
0

I know this is an old question, but I had this problem and was not able to get the command line solution to work.

Instead, I went into the MySQL installer tool and reconfigured my server. I did not change any settings, just went through the menu and clicked the same buttons on every item, then restarted the server.

This got the server back up and running no problem. After all the searching, this helped me the most.

Expenditure answered 1/11, 2015 at 22:34 Comment(0)
S
0

I had this problem before. All you need to do is uninstall what you have installed and go to MySQL Installer 5.7.11

with the MySQL Installer you don't need to download the MySQL Connectors by yourself because all of them is in the package of the MySQL Installer. Hope this help :D

Sponson answered 8/4, 2016 at 3:39 Comment(0)
P
0

Sorry to bump an old question, I was having the same problem as OP, to fix this problem all I did was to download the MSI Installer and only reinstalled the server and went through the configuration which is pretty straightforward.

Plascencia answered 28/7, 2016 at 13:37 Comment(0)
J
-1

I had this issue. Turns out Workbench is just a UI tool - it doesn't install MySQL - so there is nothing for it to connect to.

You need to download and install MySQL first then install Workbench.

Justificatory answered 30/5, 2016 at 13:13 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.