In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-11 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly introduces "how to solve the database ERROR 2003 problem". In the daily operation, I believe many people have doubts about how to solve the database ERROR 2003 problem. The editor consulted all kinds of information and sorted out a simple and easy-to-use operation method. I hope it will be helpful for you to answer the doubt of "how to solve the database ERROR 2003 problem". Next, please follow the editor to study!
[root@ora102] # mysql-uroot-pchinabidding-h292.168.247
Warning: Using a password on the command line interface can be insecure.
Troubleshoot problems:
1) the network is accessible
ERROR 2003 (HY000): Can't connect to MySQL server on '192.168.8.247' (113)
[root@ora102 ~] # ping 192.168.8.247
PING 192.168.8.247 (192.168.247) 56 (84) bytes of data.
64 bytes from 192.168.8.247: icmp_seq=1 ttl=64 time=0.510 ms
64 bytes from 192.168.8.247: icmp_seq=2 ttl=64 time=0.446 ms
64 bytes from 192.168.8.247: icmp_seq=3 ttl=64 time=0.475 ms
2) permission is no problem.
MySQL [(none)] > select host,user,password from mysql.user
+-- +
| | host | user | password | |
+-- +
| | localhost | root | * 2548EFB13B516547C44482A519B886726A3B8E42 |
| |% | root | * 2548EFB13B516547C44482A519B886726A3B8E42 |
| | 127.0.0.1 | root | * 2548EFB13B516547C44482A519B886726A3B8E42 |
| |:: 1 | root | * 2548EFB13B516547C44482A519B886726A3B8E42 |
3) vi / etc/my.cnfi to check whether the parameter bind-address is set to = 127.0.0.1
I didn't set this parameter at all. It defaults to 127.0.0.1, which restricts local login.
4) check the firewall status, as follows, active, firewall is on.
Bogon:root@~ > service iptables status
Redirecting to / bin/systemctl status iptables.service
● iptables.service-IPv4 firewall with iptables
Loaded: loaded (/ usr/lib/systemd/system/iptables.service; disabled; vendor preset: disabled)
Active: active (exited) since Wed 2017-12-06 15:01:37 CST; 2s ago
Process: 21617 ExecStop=/usr/libexec/iptables/iptables.init stop (code=exited, status=0/SUCCESS)
Process: 22369 ExecStart=/usr/libexec/iptables/iptables.init start (code=exited, status=0/SUCCESS)
Main PID: 22369 (code=exited, status=0/SUCCESS)
Dec 06 15:01:37 bogon systemd [1]: Starting IPv4 firewall with iptables...
Dec 06 15:01:37 bogon iptables.init [22369]: iptables: Applying firewall rules: [OK]
Dec 06 15:01:37 bogon systemd [1]: Started IPv4 firewall with iptables.
Check the port, and then try to see if the remote telnet port is the same.
MySQL [(none)] > show global variables like 'port'
+-+ +
| | Variable_name | Value |
+-+ +
| | port | 3306 | |
+-+ +
1 row in set (0.00 sec)
Telne really doesn't make sense.
[root@ora102 ~] # telnet 192.168.247 3306
Trying 192.168.8.247...
Telnet: connect to address 192.168.8.247: No route to host
Turn off the firewall in the source segment:
Bogon:root@~ > service iptables stop
Redirecting to / bin/systemctl stop iptables.service
Permanently close:
Bogon:root@~ > chkconfig iptables on
Log in remotely again, it's normal.
[root@ora102] # mysql-uroot-pchinabidding-h292.168.247
Warning: Using a password on the command line interface can be insecure.
Welcome to the MySQL monitor. Commands end with; or\ g.
Your MySQL connection id is 21
Server version: 5.5.29-log Source distribution
Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
Affiliates. Other names may be trademarks of their respective
Owners.
Type 'help;' or'\ h' for help. Type'\ c'to clear the current input statement.
Mysql >
At this point, the study on "how to solve the database ERROR 2003 problem" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 284
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.