开发者

Lost connection to MySQL server at 'reading initial communication packet', system error: 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开发者_JAVA技巧 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

  1. "IP: nodename nor servname provided, or not known" is returned by telnet IP 3306
  2. I have rebooted many times.


From Sequel Pro:

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.


Try using the connection method: Local Socket/Pipe. Leave the Socket Pipe/Path empty. Enter username / password and you should be good to go.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜