Why does the Windows ODBC driver fail to connect to the MySQL database on Linux?

Source: Internet
Author: User
Tags mysql odbc driver
1. The main reason is that the iptables firewall is enabled in Linux and the TCP link from window to port 3306 of MySQL is initiated.

Linux replied to ICMP server reject...The solution is to open port 3306 in the firewall; Linux uses the tool to capture packets; Iptables-A input-M state -- state new-m tcp-p tcp -- dport 22-J accept Iptables-A input-M state -- state new-m tcp-p tcp -- dport 3306-J accept Iptables-A Input  -J reject -- reject-with ICMP-host-prohibitedLinux File: (for reference only,/etc/sysconfig/iptables) # firewall configuration written by system-config-Firewall
# Manual customization of this file is not recommended.
* Filter
: Input accept [0: 0]
: Forward accept [0: 0]
: Output accept [0: 0]
-A input-M state -- State established, related-J accept
-A input-p icmp-J accept
-A input-I lo-J accept
-A input-M state -- state new-m tcp-p tcp -- dport 22-J accept
-A input-J reject -- reject-with ICMP-host-prohibited
-A forward-J reject -- reject-with ICMP-host-prohibited
Modify commit: (Takes effect permanently after restart)[Root @ centos Jack] # Cat/etc/sysconfig/iptables
# Firewall configuration written by system-config-Firewall
# Manual customization of this file is not recommended.
* Filter
: Input accept [0: 0]
: Forward accept [0: 0]
: Output accept [0: 0]
-A input-M state -- State established, related-J accept
-A input-p icmp-J accept
-A input-I lo-J accept
-A input-M state -- state new-m tcp-p tcp -- dport 22-J accept
-A input-M state -- state new-m tcp-p tcp -- dport 3306-J accept
-A input-J reject -- reject-with ICMP-host-prohibited
-A forward-J reject -- reject-with ICMP-host-prohibited
Commit
[Root @ centos Jack] # [Root @ centos Jack] # service iptables stop
Iptables: clear firewall rules: [OK]
Iptables: Set the chain to policy accept: Filter [OK]
Iptables: uninstalling module: [OK]
[Root @ centos Jack] # service iptables start
Iptables: Application Firewall Rules: [OK]
[Root @ centos Jack] # iptables-L-NV
Chain input (Policy accept 0 packets, 0 bytes)
Pkts bytes target prot opt in out source destination
14 924 accept all -- ** 0.0.0.0/0 0.0.0.0/0 state related, established
0 0 accept ICMP -- ** 0.0.0.0/0 0.0.0.0/0
0 0 accept all -- lo * 0.0.0.0/0 0.0.0.0/0
0 0 accept TCP -- ** 0.0.0.0/0 0.0.0.0/0 state New tcp dpt: 22
0 0 accept TCP -- ** 0.0.0.0/0 0.0.0.0/0 state New tcp dpt: 3306
0 0 reject all -- ** 0.0.0.0/0 0.0.0.0/0 reject-with ICMP-host-prohibited

Chain forward (Policy accept 0 packets, 0 bytes)
Pkts bytes target prot opt in out source destination
0 0 reject all -- ** 0.0.0.0/0 0.0.0.0/0 reject-with ICMP-host-prohibited

Chain output (Policy accept 8 packets, 1120 bytes)
Pkts bytes target prot opt in out source destination

2. After the ODBC driver is installed, it can be tested with MySQL. However, it is found that it cannot be connected to ODBC, an external data source of office, Excel, and Visio. A system conflict occurs;The result shows that Windows 64-bit is installed with 32-bit office. Therefore, the MySQL ODBC driver can be used only after 32-bit download. The MySQL ODBC 64-bit driver cannot be used.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.