【发布时间】: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