UbuntuMySQL remote win connection failure solution _ MySQL

Source: Internet
Author: User
UbuntuMySQL remote win connection failure solution Ubuntu

BitsCN.com


Ubuntu MySQL remote win connection failure solution

The MySQL on Ubuntu10.04 runs the root @ ubuntu :~ # Sudo apt-get install mysql after mysql is installed

Start mysql root @ ubuntu :~ #/Etc/init. d/mysql start

You can connect to the database locally. Root @ ubuntu :~ # Mysql-uroot-p

Set the remote access permission: mysql> grant all PRIVILEGES on. to admin @ '%' identified by '000000'; Query OK, 0 rows affected (123456 sec)

Mysql> use information_schema mysql> select * from user_privileges; the following result is displayed: 'admin' @ '%', indicating that mysql has authorized remote connection.

Accessing the Ubuntu database in windows cannot be connected, but apache installed on Ubuntu can be accessed. You cannot access port 3306 after using iptalbes. Root @ ubuntu :~ # Iptables-a input-p tcp-dport 3306-j ACCEPT

View Mysql Network Connection on Ubuntu: root @ ubuntu :~ # Netstat-an | grep 3306 tcp 0 0 127.0.0.1: 3306 0.0.0.0: * the local port of LISTEN is also listening

Root @ ubuntu :~ # Ufw status Firewall not loaded local Firewall not enabled

Then I found a solution on the Internet: View/etc/mysql/my. after cnf finds bind-address, it finds that 127.0.0.1 (bind-address = 127.0.0.1) is configured. change it to bind-address = 192.168.0.xxx (local ip address), and then check that Port 3306 is enabled, OK. the connection is normal.

BitsCN.com

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.