MySQL Workbench 5.2 CE, Windows 7, “Can't conn

2019-02-01 06:29发布

问题:

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.

回答1:

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.



回答2:

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.



回答3:

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.



回答4:

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



回答5:

Like this.

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

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



回答6:

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.



回答7:

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.



回答8:

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.



回答9:

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.



回答10:

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

and set port to 10061



回答11:

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



回答12:

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.



回答13:

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



回答14:

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.



回答15:

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.