自制程序"brew install mysql";在将值'127.0.0.1'设置为'server_id'时给出"...错误" [英] Homebrew "brew install mysql" giving "...Error while setting value '127.0.0.1' to 'server_id'"

查看:231
本文介绍了自制程序"brew install mysql";在将值'127.0.0.1'设置为'server_id'时给出"...错误"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近将系统升级到OS X Yosemite,并开始遇到一些问题,这些问题无法通过MySQL Workbench本地连接到我的数据库.

I recently upgraded my system to OS X Yosemite and started encountering some issues to connect locally to my Database via MySQL Workbench.

主要是关于PID文件和套接字的经典文章,我设法找到了在Web上浏览的解决方案.但是剩下一个:无法连接到'127.0.0.1'(61)(2003)上的MySQL服务器",我在MySQL网站,stackoverflow和其他论坛上发现的所有解决方案都没有起作用.

It was mainly classic ones about the PID files and socket, that I managed to find solutions for looking over the web. However one was remaining : "Can't connect to MySQL server on '127.0.0.1' (61) (2003)", and none of the solutions I found on the MySQL website, stackoverflow and other forums were working.

因此,我决定使用dmg文件(虽然适用于OS X 10.9版本,但没有适用于10.10的版本)重新安装MySQL.那没起效. 这就是为什么我最终卸载了所有可能的mysql小片段,然后使用homebrew重新安装了一个干净的版本.我遵循的步骤是那些步骤.

I therefore decided to reinstall MySQL using the dmg file (version for OS X 10.9 though, no version yet available for 10.10). It did not work. That's why I eventually uninstalled every little piece of mysql that I could and reinstalled a clean version using homebrew. The steps I followed are those ones.

但是,这也不起作用,这是我收到的错误消息:

However, this did not work either and here is the error message I got :

$ brew postinstall mysql
==> /usr/local/Cellar/mysql/5.6.21/bin/mysql_install_db --verbose --user=Antoine
Installing MySQL system tables...Unknown suffix '.' used for variable 'server_id' (value '127.0.0.1')
2014-10-20 02:35:05 0 [ERROR] /usr/local/Cellar/mysql/5.6.21/bin/mysqld: Error while setting value '127.0.0.1' to 'server_id'
2014-10-20 02:35:05 0 [ERROR] Aborting
2014-10-20 02:35:05 0 [Note] Binlog end

这使MySQL服务器无法连接到127.0.0.1更加有意义,但是我必须说我迷路了,并且不知道该在哪里查找了.我在此错误消息上找不到任何内容.我看了看mysqld文件,但这没用.

It makes now a little more sense that MySQL server was not able to connect to 127.0.0.1, but I must say that I'm lost and do not really know where to look anymore. I can't find anything on this error message. I had a look to the mysqld file, but it was useless.

您是否认为此问题与OS X Yosemite有关?我从这里可以做什么线索?

Do you think the issue is linked to OS X Yosemite? Any clue of what I could do from here?

推荐答案

我最终设法按以下顺序解决了该问题:

I eventually managed to fix the issue by, in this order :

1/升级到xcode命令行工具6.1

1/ Upgrading to xcode command line tools 6.1

2/遵循这些步骤以完全删除MySQL

2/ Following those steps to remove completely MySQL

3/重新启动计算机

4/使用OS X 10.9软件包(MySQL网站上的dmg文件)重新安装MySQL

4/ Installing MySQL back with the OS X 10.9 package (dmg file available on mysql website)

5/将my-default.cnf文件复制到etc文件夹:sudo cp /usr/local/mysql/support-files/my-default.cnf /etc/my.cnf

5/ Copying the my-default.cnf file to the etc folder : sudo cp /usr/local/mysql/support-files/my-default.cnf /etc/my.cnf

6/第一次在终端sudo /usr/local/mysql/support-files/mysql.server start

无PID问题,无套接字问题,与本地主机的连接问题.现在一切都很好.

No PID issue, no socket issue, no connection issue to localhost. Everything's fine now.

这篇关于自制程序"brew install mysql";在将值'127.0.0.1'设置为'server_id'时给出"...错误"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆