【发布时间】:2014-03-07 00:14:32
【问题描述】:
【问题讨论】:
-
假设凭据很好,我会说防火墙阻止了你。检查允许建立连接的端口和 ip(linux 中的 iptables 和基于 unix 的 os-es)
-
@AlexHristov Windows 防火墙已禁用。
标签: mysql windows windows-server-2008 mariadb navicat
【问题讨论】:
标签: mysql windows windows-server-2008 mariadb navicat
Mysql 默认绑定到 0.0.0.0,这是你系统上的所有接口。这意味着您已经可以从另一台计算机连接。问题可能是权限。您可以通过运行以下命令来启用远程连接:
GRANT ALL PRIVILEGES ON *.* TO 'root'@'192.168.%' IDENTIFIED BY '' WITH GRANT OPTION;
【讨论】:
bind-address = 127.0.0.1改成bind-address = 0.0.0.0。参考LandiLeite的回答
MariaDB 包默认将 MariaDB 绑定到 127.0.0.1(环回 IP 地址),作为使用 bind-address 配置指令的安全措施。旧的 MySQL 包有时会使用 skip-networking 指令完全禁用 TCP/IP 网络。
MariaDB 知识库https://mariadb.com/kb/en/mariadb/configuring-mariadb-for-remote-client-access/ 中提供了允许远程连接的步骤
【讨论】:
我用于在虚拟机(Ubuntu 16.04)中进行测试,对我来说,我修复了更改文件 50-server.cnf 的错误。
我的服务器是 Ubuntu,所以修改下面的文件:
50-server.cnf
这个文件的路径:
/etc/mysql/mariadb.conf.d
PS:在更改之前创建文件的备份。
仅将文件中的bind-address 127.0.0.0 更改为bind-address 0.0.0.0
在此重启服务后重试。
关于那个用户,需要允许外部连接。
希望这些信息对您有所帮助。
【讨论】: