mysql 连接61,在“读取初始通信数据包”时与MySQL服务器的连接断开,系统错误:61...

3 days on this and have hit a wall. I'm running mac os x. I have installed the mysql-5.5.14-osx10.6-x86_64.dmg.

As far as the context, I need to install the mysql gem for use with ruby on rails and that won't install properly unless there is a valid instance of mysql running.

I've tried using the /Library/StartupItems/MySQLCOM/MySQLCOM [start|stop|restart] method to start the mysql server and it comes back with no errors, but when I try to connect to localhost via the MySQL Workbench, it always says:

"Your connection attempt failed for user 'root' from your host to server at localhost:3306:

Lost connection to MySQL server at 'reading initial communication packet', system error: 61

".

I have no path on my system of /var/mysql, which indicates the Bundled MySQL is non existant?

Other solutions I've found indicate I need to comment out the bind-address in my.cnf but I am unable to find any such file on my system.

I'm thinking that maybe there is conflicts between the .dmg that's installed and the manual builds I've attempted. Also, I have a gut feeling that something in my $PATH is screwing with things, which is another thing I don't understand (the $PATH thing). I'm thinking I need to uninstall one or the other, but no idea how to properly uninstall something when there's no evidence that it's installed properly to begin with ??

Here are some things that may help:

I have an /etc/my.cnf which reads:

[mysqld]

default-character-set=utf8

[client]

default-character-set=uft8

but no /etc/mysql/my.cnf

"IP: nodename nor servname provided, or not known" is returned by telnet IP 3306

I have rebooted many times.

解决方案

On the server, configure MySQL by editing /etc/my.cnf and

comment or remove skip-networking from the [mysqld] section.

Then, restart MySQL Server.

On MySQL Ver 14.14 Distrib 5.1.67, this line says

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

So commenting out bind-address = 127.0.0.1 should work - it did for me.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值