我应该重新安装Mysql吗? [英] Should I reinstall Mysql?

查看:54
本文介绍了我应该重新安装Mysql吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在尝试让 mysql 在 osx lion 上工作时有点绝望.

I'm getting kind of desperate here trying to get mysql to work on osx lion.

过去几天,我几乎浏览了网络上的所有文章,寻找解决错误问题的方法.

I've been through nearly every article on the web these past few days looking for a way to fix the problem with the error.

当我尝试启动服务器时出现此错误:

When I try to start the server is gives this error:

无法通过socket'/tmp/mysql.sock'连接本地MySQL服务器(2)

Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)

当我尝试使用 'rake db:create' 创建一个数据库时,它给出了同样的错误.

when I try to create a database with 'rake db:create' it gives the same error.

有时它会这样说,否则我会收到有关请安装 gem-blabhalbhabhlb"的错误消息.而那颗宝石并不存在.

sometimes it says that or I get errors about "please install gem-blabhalbhabhlb". And that gem doesn't exist.

我能够使用来自 mysql 站点的 dmg 版本在终端中安装 mysql,但是在我删除安装文件后,它就停止工作了——就像我运行时一样

I was able to install mysql in terminal using the dmg version from mysql's site but after I deleted the installation files it just stopped working- as in when I run

耙CD:创建

我收到 mysql.sock 错误.

I get the mysql.sock error.

我快疯了..请帮忙

推荐答案

感谢 John P. 昨晚帮助我完成这项工作

Major credit to John P. for helping me get this working last night

首先是使用'brew uninstall mysql'卸载mysql.

The first thing was to uninstall mysql using 'brew uninstall mysql'.

然后从他们的开发站点安装 mysql.社区 .dmg 64 位版本.

Then to install mysql from their development site. The community .dmg 64 bits version.

然后找出路径指向的位置.

Then to find out where the path was pointing.

因此在更新路径时,他必须找到 bin/mysql 所在的位置,并确保 bash_profile 在那里有它的路径.

So in updating the paths he had to find where bin/mysql was and make sure bash_profile had it's path there.

PATH=$PATH:/usr/local/mysql/bin

此后的基本步骤是获取"文件,以便他让我运行此命令.

The essential step after that was to 'source' the file so he had me run this command.

source ~/.bash_profile

从那里 mysql 完美地工作.

From there mysql works flawlessly.

这篇关于我应该重新安装Mysql吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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