即时通讯使用去爸爸VPS,安装MySQLconfiguration/etc/my.cnf看起来像这样:
[mysqld] user=mysql datadir=/var/lib/mysql socket=/var/lib/mysql/mysql.sock port=3306 # bind-address=1xx.1xx.1xx.148 bind-address=1xx.1xx.1xx.148 skip-networking # Default to using old password format for compatibility with mysql 3.x # clients (those using the mysqlclient10 compatibility package). old_passwords=1 # Disabling symbolic-links is recommended to prevent assorted security risks; # to do so, uncomment this line: # symbolic-links=0 [mysqld_safe] log-error=/var/log/mysqld.log pid-file=/var/run/mysqld/mysqld.pid
那么当我在/var/log/mysql.log中看到我看到MySQL启动正确:
120113 03:58:59 mysqld started 120113 3:58:59 [Warning] option 'max_join_size': unsigned value 18446744073709551615 adjusted to 4294967295 120113 3:58:59 [Warning] option 'max_join_size': unsigned value 18446744073709551615 adjusted to 4294967295 120113 3:58:59 InnoDB: Started; log sequence number 0 43665 120113 3:58:59 [Note] /usr/libexec/mysqld: ready for connections. Version: '5.0.77' socket: '/var/lib/mysql/mysql.sock' port: 3306 Source distribution
但是当我这样做:
/usr/sbin/lsof -i:3306
我没有看到任何东西。 当我做 :
netstat -a |grep LISTEN tcp 0 0 localhost.localdomain:smtp *:* LISTEN tcp 0 0 *:http *:* LISTEN tcp 0 0 *:ssh *:* LISTEN tcp 0 0 *:https *:* LISTEN unix 2 [ ACC ] STREAM LISTENING 244331015 /var/run/saslauthd/mux unix 2 [ ACC ] STREAM LISTENING 247310795 /var/lib/mysql/mysql.sock
所以我看到一些mysql socked听…但是当我尝试从我的蟾蜍连接到远程服务器即时通讯:
无法连接到任何指定的MySQL主机。
即时连接到MySQL的根用户。 到我的应用程序数据库在3306端口。我也发现在networking分配后说删除跳过networking。 但是当我这样做。 即时消息得到这个错误,当我尝试启动Db:
120113 14:46:36 mysqld started 120113 14:46:36 [Warning] option 'max_join_size': unsigned value 18446744073709551615 adjusted to 4294967295 120113 14:46:36 [Warning] option 'max_join_size': unsigned value 18446744073709551615 adjusted to 4294967295 120113 14:46:36 InnoDB: Started; log sequence number 0 43665 120113 14:46:36 [ERROR] Can't start server: Bind on TCP/IP port: Cannot assign requested address 120113 14:46:36 [ERROR] Do you already have another mysqld server running on port: 3306 ? 120113 14:46:36 [ERROR] Aborting 120113 14:46:36 InnoDB: Starting shutdown... 120113 14:46:37 InnoDB: Shutdown completed; log sequence number 0 43665 120113 14:46:37 [Note] /usr/libexec/mysqld: Shutdown complete 120113 14:46:37 mysqld ended
我没有任何MySQL运行在这个端口或任何运行的MySQL ..
这里有什么问题?
你认为skip-networking意味着什么? 删除这个声明,它应该工作。 看到这里的解释。
注意:这个过程不会影响你的数据库。