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

2019-02-01 06:36发布

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.

15条回答
冷血范
2楼-- · 2019-02-01 06:53

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

and set port to 10061

查看更多
我欲成王,谁敢阻挡
3楼-- · 2019-02-01 06:54

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.

查看更多
欢心
4楼-- · 2019-02-01 07:04

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.

查看更多
倾城 Initia
5楼-- · 2019-02-01 07:05

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.

查看更多
欢心
6楼-- · 2019-02-01 07:06

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.

查看更多
成全新的幸福
7楼-- · 2019-02-01 07:08

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.

查看更多
登录 后发表回答