Workbench ошибка 10061

I apologise.. I know this question has been asked many times before, but I’ve tried lots of suggestions, and simply can’t find a solution.

The problem: I have a MySQL database running on a hosted server.
I have to use SSH to connect to it, and I have the relevant Public and Private Key files.

I specifically want to use the PC version of MySQL Workbench, to access this database, for running queries, checking data, etc.

If I run Sequel Pro on a Mac, it connects fine, and I can browse and query the database. No problems.

If I run the trial version of SQLyog on a PC, it also connects fine. No problems.

But if I try to connect use MySQL’s own «MySQL Workbench» application, using exactly the same settings and SSH Private Key file, it refuses to connect, throwing the well-known error:

Can’t connect to MySQL server on 127.0.0.1′ (10061)

I find it frustrating, as, in SQL Workbench, I specified the «MySQL Hostname» to use, db01.mysql.vm.MyHostingServer.net, but Workbench seems to ignore it, and demand to connect to 127.0.0.1 instead.

(I have read that Workbench says it needs the Public key file, but actually means the Private key file… and I have tried with both. I’ve also tried with MySQL Workbench on a Mac, but that crashed all over the place, simply when I was typing in server names and passwords.. it was a mess !!)

The hosting service I’ve gone with gives me limited permissions for changing MySQL settings, and given that Sequel Pro and SQLyog can connect successfully, I don’t want to start messing about and changing things randomly.

Any ideas…?



Я недавно установил MySQL 5 на Windows 2003 и попытался настроить экземпляр. Все работало нормально, пока я не добрался до «применения настроек безопасности», после чего он дал мне вышеуказанную ошибку (Can't connect to MySQL server on 'localhost' (10061)).

У меня есть исключение порта 3306 в моем брандмауэре для «MySQL Server».


17853  


18  

18 ответов:

вам, вероятно, придется предоставить привилегии «localhost» в таблице пользователю. Смотрите 'GRANT' синтаксис документации. Вот пример (из какого источника).

«предоставить все привилегии на %s.* для’%s’@ ‘localhost’, идентифицированного ‘%s'»;

Это самая распространенная проблема с MySQL.

кроме этого, вы можете проверить, что пользователь, которого вы определили для создания вашего экземпляра, имеет полные права, иначе пользователь не может предоставлять привилегии.

кроме того, убедитесь, что служба mysql запущена.

убедитесь, что у вас не включен сторонний брандмауэр или Служба безопасности Интернета.

кроме того, есть несколько страниц форума MySQL, посвященных этому:
http://forums.mysql.com/read.php?11,9293, 9609#msg-9609

попробуйте прочитать это.

получил эту ошибку на Windows, потому что мой mysqld.exe не работал.

побежал «C:Program FilesMySQLMySQL Server 5.5binmysqld» —install из командной строки, чтобы добавить его в мои службы, запустите службы.msc (start -> run), нашел службу MySQL и запустил ее.

не пришлось беспокоиться об этом оттуда.

чтобы решить эту проблему:

  1. идем в Диспетчер задач
  2. выберите вкладку Услуги
  3. найти службу MySql
  4. под управлением

вот и все.

У меня были трудности с доступом к MySQL при подключении через соединение localhost на стандартном порту 3306, который отлично работал, когда я установил и настроил его для предыдущих классов, которые я взял в MySQL и Java. Я получал ошибки, такие как» ошибка 2003 «и»не удается подключиться к серверу MySql на localhost (10061)». Я попытался подключиться как из MySQL Workbench (5.2.35 CE), так и из Netbeans (7.2). Я использую Windows 7 64 bit professional.

Я попытался ввести службы.msc в самом начале окно поиска меню, которое открыло диалоговое окно службы, чтобы показать все службы, установленные в windows. Я прокрутил вниз к MySQL и запустил эту службу. Последующие попытки подключиться к MySQL из MySQL WorkBench и из командной строки завершились успешно.

  1. убедитесь, что ваш хост-файл windows (расположен по адресу c://windows/system32/drivers/etc.host) имеет следующие линии. Если нет, добавьте его в конце

    127.0.0.1 localhost
    ::1 localhost
    
  2. иногда mysql не может вызвать Windows для принудительного запуска служб хоста, если брандмауэр блокирует его, поэтому запустите его вручную

win+выполнить>>услуги.msc, выберите «MySQL_xx», где» xx » — это имя, которое вы назначили службам хоста MySQL во время установки. Нажмите на кнопку «начать», чтобы начать с гиперссылки появился на левой стороне.

Я попробовал решение Kuzhichamadam Inn и обнаружил, что необходимо внести небольшое изменение.

MYSQL57 был сетевой службой. Я пробовал это неоднократно без успеха. Когда я открыл службы.msc я нашел другой сервис для localhost: MySQL. Я начал это с помощью процесса ниже, и это сработало.

выполнить > Services.МСЦ > правой кнопкой мыши по MySQL > «свойства» >в начало

пресс клавиша Windows + R
напишите » услуги.МСЦ» введите
ищите «MYSQL56»
напишите нажмите на нее и Запустите сервис

для локального подключения к MySql, вам не нужно настраивать брандмауэр с входящими правилами. Но даже если вы уже установка iptables разрешить TCP входящий порт 3306 и предоставить привилегию пользователю для доступа к БД локально, вы, возможно, придется настроить адрес привязки в вашем my.cnf файл, отредактируйте там адрес по умолчанию и поместите IP-адрес сервера, на котором работает MySql сервис.

run > services.msc > rightclick MySQL57 > properties >set start type option to automatic

после перезагрузки компьютера

At cmd

cd: C:

C :> cd "C:Program FilesMySQLMySQL Server 5.7bin"

станет

C:Program FilesMySQLMySQL Server 5.7bin>

тип mysql -u root -p

ie C:Program FilesMySQLMySQL Server 5.7bin> mysql -u root -p

введите пароль: ****

вот и все

это приведет к

mysql>

Я получил эту ошибку, когда у меня закончилось место на моем диске.

на выполнить тип services.msc. проверьте, работают ли Службы MySQL. Если нет, запустите его вручную. После его запуска введите MySQL Show для тестирования сервиса.

другая возможность:

существует два способа подключения клиента MySQL к серверу: через TCP/IP или с помощью сокетов. Возможно, у вас есть сервер MySQL, настроенный для поддержки сокетных соединений, но не сетевых соединений.

ничего не делать просто «сбросить по умолчанию» настройки брандмауэра он начнет работать.

Я прочитал много решений, но ничего не работало должным образом, поэтому, наконец, я сбросил настройки брандмауэра, которые работали.

наконец-то решил эту проблему.. попробуйте запустить mysql в xammp. Флажок mysql в xammp должен быть снят. тогда начинай. после этого вы можете открыть mysql, и теперь он будет подключаться к localhost

отредактируйте свой ‘ my-default.ini ‘ файл (по умолчанию он поставляется с комментариями свойств), как показано ниже ie.

basedir=D:/D_Drive/mysql-5.6.20-win32
datadir=D:/D_Drive/mysql-5.6.20-win32/data
port=8888

есть очень хорошая статья представит, что диктует команды для создания пользователя, просматривать таблицы и т. д. т. е.

http://www.ntu.edu.sg/home/ehchua/programming/sql/MySQL_HowTo.html#zz-3.1

Так как я боролся и нашел немного другой ответ вот он:

недавно я переключил локальный сервер (интрасеть) на своем новом рабочем месте. Установлена лампа; Debian, Apache, MySql, PHP. Пользователи на работе подключают сервер с помощью имени хоста, позволяет называть его «intaserv». Я настроил все, получил его работу, но не смог подключить Мой MySql удаленно, что бы я ни делал.

Я нашел свой ответ после бесконечных попыток, хотя. вы можете иметь только один привязать-адрес и он не может быть имя хоста, в моем случае «интранет».

Это должен быть IP-адрес, например. «bind-address=192.168.0.50».

Anglais:

  • нажмите клавишу windows + R
  • пишем «Services.msc » затем нажмите Enter
  • поиск MySQL57 и щелкните правой кнопкой мыши
  • нажмите на кнопку запустить службу

Français:

  • Appuyez sur la touche Windows + R
  • Écrire «услуги.msc » Puis appuyez sur Entrée
  • Recherchez MySQL57 et clic droit
  • Cliquez sur rédémarrer
  1. щелкните правой кнопкой мыши на моем компьютере
  2. нажмите на управление
  3. перейти к службам и приложениям
  4. выберите службы и найдите MySQL service
  5. Правой Кнопкой Мыши на MySQL и выберите Start

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.

Michael Petrotta's user avatar

asked Jun 21, 2013 at 2:59

Angelo Rivera's user avatar

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.

answered Feb 24, 2014 at 19:30

Gyan Veda's user avatar

Gyan VedaGyan Veda

6,25911 gold badges41 silver badges65 bronze badges

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 FilesMySQLMySQL Server 5.Xbin

Once inside bin type in:

C:Program FilesMySQLMySQL Server 5.Xbin :> 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.

answered Jun 21, 2013 at 4:53

user2339071's user avatar

user2339071user2339071

4,2441 gold badge27 silver badges46 bronze badges

2

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.

answered Sep 9, 2014 at 20:31

Tower Jimmy's user avatar

Tower JimmyTower Jimmy

5671 gold badge4 silver badges15 bronze badges

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

answered Jul 24, 2014 at 3:04

ObviousChild's user avatar

Like this.

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

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

enter image description here

answered Nov 7, 2014 at 8:58

saneryee's user avatar

saneryeesaneryee

3,18930 silver badges22 bronze badges

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.

answered Jun 1, 2015 at 13:00

togu's user avatar

togutogu

611 silver badge8 bronze badges

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:WindowsSystem32> ]
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.

answered Aug 29, 2015 at 2:16

tanya nash's user avatar

Following command worked for me. Try it:

C:wampbinmysqlmysql5.6.17binmysqld.exe --console

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

Machavity's user avatar

Machavity

30.7k27 gold badges91 silver badges100 bronze badges

answered Apr 16, 2016 at 1:02

Hamid Hoseini's user avatar

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 filesmysql
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.

answered Aug 23, 2014 at 10:30

Niranjan's user avatar

NiranjanNiranjan

1,8792 gold badges21 silver badges28 bronze badges

Go to C:cd Program FilesMySQLMySQL Server 5.Xbin directory and run file «MySQLInstanceConfig.exe»

and set port to 10061

answered Dec 27, 2014 at 11:59

dsk's user avatar

dskdsk

6151 gold badge7 silver badges19 bronze badges

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

answered Sep 30, 2015 at 12:36

Niranjan's user avatar

NiranjanNiranjan

1,8792 gold badges21 silver badges28 bronze badges

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.

answered Nov 1, 2015 at 22:34

Eric Conklin's user avatar

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

answered Apr 8, 2016 at 3:39

Toby16's user avatar

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.

answered Jul 28, 2016 at 13:37

owelchez's user avatar

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.

answered May 30, 2016 at 13:13

Sprose's user avatar

SproseSprose

1,2451 gold badge15 silver badges19 bronze badges

#1 13.01.2010 16:16:20

TrixX
Участник
Зарегистрирован: 13.01.2010
Сообщений: 3

10061 ошибка при подключении к базе.

10061 ошибка возникает из-за того что MySql не слушает порт. Но какой именно? как узнать какой порт нужен чтоб открыть его? и если есть другие способы как подключится удаленно скажите пожалуйста.

Неактивен

#2 13.01.2010 16:58:32

paulus
Администратор
MySQL Authorized Developer and DBA
Зарегистрирован: 22.01.2007
Сообщений: 6753

Re: 10061 ошибка при подключении к базе.

Порт 3306. Удаленно подключиться можно только по tcp/ip.

Причин может быть несколько:
1. Не запущена служба MySQL;
2. Брэндмауэр блокирует этот порт от внешних соединений;
3. MySQL не слушает порт, потому что в нем запрещены соединения
по сети (skip-networking в my.ini);
4. MySQL не слушает внешний интерфейс (bind-address в my.ini).

Неактивен

#3 15.01.2010 14:46:10

TrixX
Участник
Зарегистрирован: 13.01.2010
Сообщений: 3

Re: 10061 ошибка при подключении к базе.

чтоб появился my.ini устанавливаем VentrigoServ smile там будут эти настройки. Пока не пробовал,как попробую если поможет отпишусь. Заранее спасибо админу)

Отредактированно TrixX (15.01.2010 14:48:47)

Неактивен

#4 15.01.2010 15:01:37

paulus
Администратор
MySQL Authorized Developer and DBA
Зарегистрирован: 22.01.2007
Сообщений: 6753

Re: 10061 ошибка при подключении к базе.

Интересно, чем Вам стандартный инсталятор не угодил smile

Неактивен

#5 15.01.2010 17:37:31

TrixX
Участник
Зарегистрирован: 13.01.2010
Сообщений: 3

Re: 10061 ошибка при подключении к базе.

my.cnf файл в mysql там просто бинд айпи убрал. спасибо Администратору) все пашет, ошибка 10061 устранена. Ураsmile

Неактивен

#6 11.03.2011 21:32:02

Ася
Участник
Зарегистрирован: 11.03.2011
Сообщений: 1

Re: 10061 ошибка при подключении к базе.

помогите, дает ошибку 10061 причем попробовала загрузить ранее сказаный VentrigoServ не помогло

Неактивен

#7 16.03.2011 21:13:45

paulus
Администратор
MySQL Authorized Developer and DBA
Зарегистрирован: 22.01.2007
Сообщений: 6753

Re: 10061 ошибка при подключении к базе.

Если Вы делаете то же самое, то сделайте то же самое. Если нет — опишите
проблему smile

Неактивен

MySQL Workbench could not connect to MySQL

MySQL Database (Db) is a database service that runs on a Local Server and on the Web. It is ideal for both small and large applications and it uses the standard SQL language. MySQL is free to download and use and has the most comprehensive set of advanced features, management tools, and technical support to achieve the highest levels of MySQL scalability, security, reliability, and uptime. The data in a MySQL database are stored in tables. A table is a collection of related data, and it consists of columns and rows, and the Db is useful for storing information categorically. This article, you will learn how to fix MySQL Workbench could not connect to MySQL server on the localhost 10061. In this article, you will learn how to fix ‘MySQL Workbench could not connect to MySQL server”

Note: It is worth noting that by default, the MySQL server listens for connections only from localhost. Which means it can be accessed only by applications running on the same host. But in production environments, you can allow remote access to the MySQL server.  

In this aspect, you will have to configure the MySQL server to listen on a specific IP address. Or all IP addresses on the server. See the following guides on MySQL. How to reset Mysql Root password, how to access MySQL Server from command Prompt, how to create and delete MySQL database, and how to migrate Veeam MsSQL Database to a new MsSQL Server.

This article shows the steps to resolve connection issues to MySQL Servers. See how to install Microsoft SQL Server 2019 and MsSQL Command line tools on Ubuntu Linux, how to uninstall Microsoft SQL Server on Windows 10 and Windows Server, and how to download and install Microsoft SQL Server 2019 Developer Edition and Microsoft SQL Server Management Studio on Windows 10 and Windows Server.

This error is shown in because the application was unable to connect to the MySQL server. There could be a number of reasons. But in my case, it was because the service was stopped and the service was not running. To fix this issue, kindly follow the steps below.

Launch MySQL Workbench to open the home screen. Existing connections are shown when you click the MySQL Connections view from the sidebar. No connections exist for first-time users.

Launch MySQL Workbench

Click on the Server Menu and click on Startup/Shutdown option as shown below

This will open up the Administration -Startup/Shutdown window. Click on Start Server

Accept the UAC. Next, you will be required to enter your password in order to start the database server. Enter your password and click on OK.

From the Administration, the Startup/Shutdown window, you should see the server is now running. And on this window, you can stop or take the server offline.

As you can see, the MySQL service is also running. And this is all that is needed to resolve this connection issue.

I hope you found this blog post helpful. You have learned how to fix the following error “MySQL Workbench could not connect to MySQL server on the localhost 10061”. If you have any questions, please let me know in the comment session.

Студворк — интернет-сервис помощи студентам

Пытаюсь подключится к БД MySQL, установленном на своем же компе, через внешний IP.

Пробовал через DSN и через MySQLQueryBrowser.
Ввожу username root, pass 333, название БД, IP, порт 3306.

1) 127.0.0.1 — все нормально.
2) 178.*.*.* (мой внешний IP, честно выданный провайдером) — ошибка 10061 Can’t Connect to mySQL Server.

Итак:
Установлен Denwer.
1. Пинги на мой внешний IP проходят нормально.
2. Строка bind … localhost в файле config.cnf закомментирована диезом.
3. Порт 3306 в моем ADSL модеме Zyxel P600 перенаправлен на мой единственный адрес 192.168.1.2 (настройки локального подключения с модемом указаны вручную), Upnp включен, аппаратного файрвола нет. Модемом можно свободно управлять через внешний IP.
Порт добавлен в исключения Avira, в т.ч. пробовал ее отключать. Порт в исключениях брандмауера Windows, + он отключен. Сайт 2ip.ru пишет, что порт открыт.
4. Привилегии указанному юзеру даны полные для любых адресов:
GRANT ALL PRIVILEGES ON `sara`.* TO root@’%’ IDENTIFIED BY ‘333’;

Система: Windows 7 SP1 x64.

Что еще нужно сделать чтобы подключение завелось?

Я извиняюсь. Я знаю, что этот вопрос задавался много раз раньше, но я пробовал много предложений и просто не могу найти решение.

Проблема: у меня есть база данных MySQL, запущенная на размещенном сервере.
Я должен использовать SSH для подключения к нему, и у меня есть соответствующие файлы Public и Private Key.

Я специально хочу использовать версию ПК MySQL Workbench для доступа к этой базе данных, для запуска запросов, проверки данных и т.д.

Если я запускаю Sequel Pro на Mac, он прекрасно соединяется, и я могу просматривать и запрашивать базу данных. Нет проблем.

Если я запускаю пробную версию SQLyog на ПК, она также прекрасно соединяется. Нет проблем.

Но если я попытаюсь подключить использование MySQL собственного приложения MySQL Workbench, используя точно такие же настройки и файл приватного ключа SSH, он отказывается подключаться, бросая известную ошибку:

Невозможно подключиться к серверу MySQL на 127.0.0.1 ‘(10061)

Мне кажется, что это разочаровывает, так как в SQL Workbench я указал «MySQL Hostname» для использования, db01.mysql.vm.MyHostingServer.net, но Workbench, похоже, игнорирует его и требует подключения к 127.0.0.1 вместо.

(Я прочитал, что Workbench говорит, что ему нужен файл открытого ключа, но на самом деле это файл приватного ключа… и я попытался с ними. Я также пытался работать с MySQL Workbench на Mac, но это разбило все над местом, просто когда я печатал имена и пароли серверов.. это был беспорядок!!)

Служба хостинга, с которой я перешел, дает мне ограниченные разрешения для изменения настроек MySQL, и, учитывая, что Sequel Pro и SQLyog могут успешно соединяться, я не хочу начинать беспорядочно и беспорядочно меняться.

Любые идеи…?

Понравилась статья? Поделить с друзьями:
  • World of tanks снг ошибка
  • World of tanks ошибка подключения к серверу
  • World of tanks ошибка dns
  • World of tanks ошибка dll advapi32 dll
  • World of tanks ошибка 9010