|
|||
| Roma1314704
11.02.18 — 13:39 |
Не могу понять суть ошибки при подключении к внешнем источникам DRIVER={MySQL ODBC 3.51 Driver};SERVER=94.249.146.189;DataBase=users;charset=cp1251;UID=***;PWD=***** логин и пароль 100% правильные
Получаю ошибку — |
||
| Лефмихалыч
1 — 11.02.18 — 13:44 |
а чем-нибудь еще, кроме ODBC, ты к этому серверу оттуда же можешь подключиться? heidisql — напрмер |
||
| Roma1314704
2 — 11.02.18 — 14:12 |
нету другой возможности |
||
| Лефмихалыч
3 — 11.02.18 — 14:33 |
(2) заставь себя скачать портабельный heidisql и проверить возможность соединения чем-то, кроме ODBC. Будь мужиком. |
||
| glebgleb
4 — 11.02.18 — 16:59 |
(2) Программирование оказывается крепче пальца, которым в него тыкают.
1) google://»ODBC:SQLSTATE HY000 Номер ошибки 2003″ |
||
| glebgleb
5 — 11.02.18 — 17:05 |
Хинт — с чего ты взял, что товарищи из сети GHOSTnet GmbH позволят тебе тыкать пальцем в MySql снаружи? |
||
| rphosts
6 — 11.02.18 — 17:41 |
(0) поставь DBeaver — у него свои дрова(JDBC) в комплекте. Если им коннектится — ищи проблему со стороны 1С или того компа с которого 1С туда лезет (там где выполняется серверный контекст). |
||
| Roma1314704
7 — 11.02.18 — 19:18 |
Есть строка подключения для DBeaver ? Или им только просматривать базу ? |
||
| Лефмихалыч
8 — 11.02.18 — 20:48 |
(5) https://turbosms.ua/sqlinfo.html (7) самое главное — сиди на попе ровно, продолжай задавать пустые вопросы, ничего руками не трогай и не пробуй ничего сделать самостоятельно. Жди, когда проблема решит сама себя по волшебству. |
||
|
Roma1314704 9 — 11.02.18 — 21:19 |
При чем здесь эта ссылка? |
ВНИМАНИЕ! Если вы потеряли окно ввода сообщения, нажмите Ctrl-F5 или Ctrl-R или кнопку «Обновить» в браузере.
Тема не обновлялась длительное время, и была помечена как архивная. Добавление сообщений невозможно.
Но вы можете создать новую ветку и вам обязательно ответят!
Каждый час на Волшебном форуме бывает более 2000 человек.
If you are running Ubuntu via WSL (Windows Subsystem for Linux) and wish to connect to the MySQL instance on the host machine, you will need to use the host machine’s IPv4 address e.g. 192.X.X.X, not 127.0.0.1 or localhost.
$ mysql -u <user> -h 127.0.0.1 -p -P 3306
ERROR 2003 (HY000): Can't connect to MySQL server on '127.0.0.1:3306' (111)
$ mysql -u <user> -h 192.X.X.X -p -P 3306
Welcome to the MySQL monitor...Server version: 8.0.26 MySQL Community Server - GPL
Copyright (c) 2000, 2022, Oracle and/or its affiliates.
Type 'help;' or 'h' for help. Type 'c' to clear the current input statement.
mysql>
To check your IPv4 address, go to Settings -> Network $ Internet -> Properties -> IPv4 address.
I got the same error configuring MySQL URI for apache airflow as:
mysql+mysqlconnector://<user>:<password>@localhost:3306/<database>
(mysql.connector.errors.DatabaseError) 2003 (HY000): Can't connect to MySQL server on 'localhost:3306' (111)
or
mysql+mysqlconnector://<user>:<password>@127.0.0.1:3306/<database>
(mysql.connector.errors.DatabaseError) 2003 (HY000): Can't connect to MySQL server on '127.0.0.1:3306' (111)
Fixed the error configuring the URI as:
mysql+mysqlconnector://<user>:<password>@192.X.X.X:3306/<database>
If you are running Ubuntu via WSL (Windows Subsystem for Linux) and wish to connect to the MySQL instance on the host machine, you will need to use the host machine’s IPv4 address e.g. 192.X.X.X, not 127.0.0.1 or localhost.
$ mysql -u <user> -h 127.0.0.1 -p -P 3306
ERROR 2003 (HY000): Can't connect to MySQL server on '127.0.0.1:3306' (111)
$ mysql -u <user> -h 192.X.X.X -p -P 3306
Welcome to the MySQL monitor...Server version: 8.0.26 MySQL Community Server - GPL
Copyright (c) 2000, 2022, Oracle and/or its affiliates.
Type 'help;' or 'h' for help. Type 'c' to clear the current input statement.
mysql>
To check your IPv4 address, go to Settings -> Network $ Internet -> Properties -> IPv4 address.
I got the same error configuring MySQL URI for apache airflow as:
mysql+mysqlconnector://<user>:<password>@localhost:3306/<database>
(mysql.connector.errors.DatabaseError) 2003 (HY000): Can't connect to MySQL server on 'localhost:3306' (111)
or
mysql+mysqlconnector://<user>:<password>@127.0.0.1:3306/<database>
(mysql.connector.errors.DatabaseError) 2003 (HY000): Can't connect to MySQL server on '127.0.0.1:3306' (111)
Fixed the error configuring the URI as:
mysql+mysqlconnector://<user>:<password>@192.X.X.X:3306/<database>
If you are running Ubuntu via WSL (Windows Subsystem for Linux) and wish to connect to the MySQL instance on the host machine, you will need to use the host machine’s IPv4 address e.g. 192.X.X.X, not 127.0.0.1 or localhost.
$ mysql -u <user> -h 127.0.0.1 -p -P 3306
ERROR 2003 (HY000): Can't connect to MySQL server on '127.0.0.1:3306' (111)
$ mysql -u <user> -h 192.X.X.X -p -P 3306
Welcome to the MySQL monitor...Server version: 8.0.26 MySQL Community Server - GPL
Copyright (c) 2000, 2022, Oracle and/or its affiliates.
Type 'help;' or 'h' for help. Type 'c' to clear the current input statement.
mysql>
To check your IPv4 address, go to Settings -> Network $ Internet -> Properties -> IPv4 address.
I got the same error configuring MySQL URI for apache airflow as:
mysql+mysqlconnector://<user>:<password>@localhost:3306/<database>
(mysql.connector.errors.DatabaseError) 2003 (HY000): Can't connect to MySQL server on 'localhost:3306' (111)
or
mysql+mysqlconnector://<user>:<password>@127.0.0.1:3306/<database>
(mysql.connector.errors.DatabaseError) 2003 (HY000): Can't connect to MySQL server on '127.0.0.1:3306' (111)
Fixed the error configuring the URI as:
mysql+mysqlconnector://<user>:<password>@192.X.X.X:3306/<database>
При попытке подключиться к MySQL или Percona сервер с настройками по-умолчанию с другой рабочей станции или сервера, можно получить ошибку
ERROR 2003 (HY000): Can’t connect to MySQL server on ‘xx.xx.xx.xx’ (111)
Далее описаны 3 шага, которые нужно пройти для установления соединения.
The first thing we can check is to see if the user from the remote host is allowed.
1. Login as root on mysql server
mysql -u root -p
2. Select database and show users.
select * from mysql.userG
**A vertical list will be displayed. Look at the first two fields for each entry. If the user is only allowed to connect from localhost, this may be the problem.
Example:
Host: localhost
User: mydbuser
A user will have to be defined with the same parameters as mydbuser for the remote host (or hosts)
Here’s where your documentation will come in handy (or you can hope the old query exists in the mysql buffer!)
3. Allow remote hosts to connect
grant select,insert,update,delete,create,drop,index,alter on mydbname.* to mydbuser@’192.168.1.%’ identified by ‘mydbpassword’ ;
flush privileges;
Note: if you only want to allow a certain host, specify the IP instead of the wildcard.
The second issue that may cause this error is a MySQL configuration.
1. Open MySQL config file
nano /etc/my.cnf
2. Ensure that the following are commented out.
#skip-external-locking
#skip-networking
#bind-address = xx.xx.xx.xx
Save and exit
3. Restart mysql service
service mysqld start
The third issue that may contribute to this error may be the security configuration rejecting incoming requests on the server.
1. Login as root on db server
2. Add rule to iptables
/sbin/iptables -A INPUT -i eth0 -s 192.168.1.0/24 -p tcp —destination-port 3306 -j ACCEPT
** this grants access to the entire subnet, use a specific IP where applicable.
service iptables save
3. Restart iptables service
service iptables restart
Test from remote host by using the following:
mysql -h 192.168.my.dbip -u mydbuser -p