各位大大:
          本人做了1个MYSQL数据库,本机连接没有问题,可以读写操作。但是在局域网其他机器上就连接不上,错误如下。
  求教!
          can not connect to mysql server on 172.16.3.10连接语句为
DBConn = new MySQLConnection(new MySQLConnectionString("172.16.3.10", "database", "root", "666666", 3306).AsString);
DBConn.Open();

解决方案 »

  1.   

    需要授权别的机器访问
    grant all on *.* to username@'%' identified by 'yourpassword';
      

  2.   

    我在MYSQL的DOS命令下打了grant all on *.* to root@'%' identified by '666666';
    显示Query OK,0rows affected(0.00sec)
    但是还是连不上,显示同样的错误,"can not connect to mysql server on 172.16.3.10"后面接个10060
      

  3.   

    能telent xx.xxx.xxx.xxx  3306端口吗
      

  4.   

    学习用百度谷歌
    zz连接数据库的时候显示Can't connect to MySQL server (10060),基本可以按照以下思路进行排查:
    1. 网络不通。
        检查能不能ping通。
    2. 防火墙设置。
        防火墙是否放过mysql的进程,是否屏蔽了mysql的3306端口。
    3. mysql的账户设置。
        mysql账户是否不允许远程连接。如果无法连接可以尝试以下方法:
        mysql -u root -p    //登录MySQL 
        mysql> GRANT ALL PRIVILEGES ON *.* TO 'root'@'%'WITH GRANT OPTION;     //任何远程主机都可以访问数据库 
        mysql> FLUSH PRIVILEGES;    //需要输入次命令使修改生效
        mysql> EXIT    //退出
        也可以通过修改表来实现远程:
        mysql -u root -p
        mysql> use mysql; 
        mysql> update user set host = '%' where user = 'root'; 
        mysql> select host, user from user;
      

  5.   

    参考下贴中的检查方法并贴出你的检查结果(#43楼)http://topic.csdn.net/u/20090920/22/14d4f597-b7d4-4c24-b0db-abb2956e66c3.html
    [收集]mysql   无法联接故障现象及原因