MySQL 5.5 Community Server
MySQL 5.6 Community Server
Percona Configuration Wizard
XtraBackup 搭建主从复制
Great Sites on MySQL
Percona
MySQL Performance Blog
Severalnines
推荐管理工具
Sequel Pro
phpMyAdmin
推荐书目
MySQL Cookbook
MySQL 相关项目
MariaDB
Drizzle
参考文档
http://mysql-python.sourceforge.net/MySQLdb.html
colorsand
V2EX  ›  MySQL

mysql 不能远程连接

  •  
  •   colorsand · Sep 29, 2015 · 3857 views
    This topic created in 3886 days ago, the information mentioned may be changed or developed.

    通过
    grant select,lock tables on discuz.* to ted@’ 115.28.36.60 ′ identified by ’ 123456 ′;
    授权之后,仍然不能连接,防火墙已经添加了 3306 端口的例外

    6 replies    2015-09-29 20:55:19 +08:00
    mahone3297
        1
    mahone3297  
       Sep 29, 2015
    my.cnf 配置中,查看 bind
    colorsand
        2
    colorsand  
    OP
       Sep 29, 2015
    是 window 主机, my.ini 中绑定了 0.0.0.0,现在估计原因在网络层,访问外网 ip 的时候,可能没有将 3306 端口映射的内网主机。
    ftfniqpl
        3
    ftfniqpl  
       Sep 29, 2015
    grant 命令执行了之后,并不会马上生效,需要 flush privileges 或者 restart mysql 才能生效
    kohnv
        4
    kohnv  
       Sep 29, 2015
    上午刚试了试 mysql 的远程连接. 一开始也连不上, 后来发现是 windows 的防火墙没有添加 mysqld.exe
    thank243
        5
    thank243  
       Sep 29, 2015
    看看 my.cnf 里面的 bind 。
    goofansu
        6
    goofansu  
       Sep 29, 2015
    建议用支持 ssh 连接的软件, mac 的话用 Sequel Pro 。这样只要 ssh 账户就能登录数据库,随便你在哪个 ip 都不用设置权限
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1493 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 43ms · UTC 16:59 · PVG 00:59 · LAX 09:59 · JFK 12:59
    ♥ Do have faith in what you're doing.