【问题标题】:Why is mysql running with --skip-networking?为什么mysql使用--skip-networking运行?
【发布时间】:2014-06-08 16:29:54
【问题描述】:

我有 ubuntu 12.04,mysql 版本 5.5.35。 /etc/mysql/my.cnf 文件没有 --skip-networking 或 --skip-grant-tables 属性。它用以下行注释:

# Instead of skip-networking the default is now to listen only on
# localhost which is more compatible and is not less secure.
bind-address            = localhost

但是,当我执行“ps aux | grep mysql”时,会返回以下内容:

root     28880  0.0  0.0  60068  1904 ?        S    Jun02   0:00 sudo /usr/sbin/mysqld --skip-grant-tables --skip-networking
mysql    28881  0.0  1.1 615828 43844 ?        Sl   Jun02   3:35 /usr/sbin/mysqld --skip-grant-tables --skip-networking

为什么它使用这些属性运行? 如果这些属性打开,我还能从 localhost 连接 JDBC 吗? 如何关闭它们?

【问题讨论】:

  • 你是如何启动mysql的?您是否检查过初始化脚本为什么要添加这些选项?对于您最初的问题(“我可以连接吗?”)-您尝试过吗?
  • 这应该移到 serverfault。
  • 我无法连接,我已经尝试过在另一台计算机上运行的代码。我用“service mysql start”开始它

标签: mysql ubuntu-12.04


【解决方案1】:

mysql 服务器没有正常运行。我不得不手动终止该进程并使用“sudo service mysql start”启动它。现在它在正确的端口上运行,并且没有 --skip-networking 和 --skip-grant-tables。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2021-09-21
    • 2012-02-02
    • 1970-01-01
    • 2023-04-11
    • 2014-05-09
    • 2017-12-20
    • 2017-05-30
    • 2023-01-19
    相关资源
    最近更新 更多