【问题标题】:Can't connect to MariaDB on localhost using DBeaver无法使用 DBeaver 连接到本地主机上的 MariaDB
【发布时间】:2018-06-15 19:58:17
【问题描述】:

我刚刚在 Ubuntu 上安装了mariadb

mysql Ver 15.1 Distrib 10.0.31-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2

我可以通过本地网络服务器使用 PHP 连接到数据库,并且可以通过命令行进行连接。但是,我无法让 DBeaver 从 GUI 连接。我使用 MariaDB 驱动程序为 3306 端口上的 localhost 设置了一个连接,并使用了我在 cli 中使用的 root 用户/密码。

我收到此错误:

Could not connect to address=(host=localhost)(port=3306)(type=master) : Connection refused (Connection refused)

知道这是需要更改的 my.cnf 设置,还是我在 DBeaver 中缺少其他设置?

【问题讨论】:

    标签: mysql mariadb dbeaver


    【解决方案1】:

    这个答案有帮助:https://serverfault.com/questions/808977/mariadb-refuses-remote-connections

    但特别指出您可能需要重新启动机器的评论 - 运行 sudo /etc/init.d/mysql restart 表明服务器已重新启动,但更改的 IP 绑定显然在我重新启动机器之前没有得到刷新。

    我换行了:

    bind-address = 127.0.0.1

    bind-address = ::

    【讨论】:

    • 谢谢,在使用 Brew 升级 Postgres 后,在 Mac OSX 上遇到了类似的问题。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-04-21
    • 1970-01-01
    • 2014-11-06
    • 1970-01-01
    • 2020-05-30
    相关资源
    最近更新 更多