在 Mac OS X 服务器上升级 MySQL
我正在尝试(但失败了)在 Mac OS X Server (Leopard) 上升级 MySQL,并遇到了麻烦。尽管 OS X Server 文档说计算机上有多个版本的 MySQL 是“正常”的,但他们没有详细说明如何“管理”它们。
我已经构建并安装了比 Apple 捆绑的原始版本 (5.0.x) 更新的版本 (5.1.40)。
服务器管理似乎只管理 /usr/bin 中的初始(5.0.x)安装,
因此我已在服务器管理中停止了该版本,但无法让新版本(在 /usr/local/mysql 中)工作。
理想情况下,我想将新版本的 mysql 指向 /var/mysql 中的旧数据库文件,但不确定如何...
编辑: 看起来像我的新 MySQL处于活动状态(无论如何对于某些用户而言),但它指向不同的数据文件。它指向 /usr/local/mysql/data
并且我希望它指向 /var/mysql
管理员用户可以连接,但其他人得到:ERROR 2002 ( HY000): 无法通过套接字“/tmp/mysql.sock”连接到本地 MySQL 服务器 (2)
。我假设是因为这个新数据库还没有启用这些用户?!?!虽然我认为我仍然可以 $ mysql -u root -p
到它?!?
有人知道如何管理这个吗?
I'm attempting (and failing) to upgrade MySQL on Mac OS X Server (Leopard) and running into trouble. Though the OS X Server docs say it's "normal" to have multiple versions of MySQL on your machine they don't go into any detail of how to "manage" them.
I have built and installed a newer version (5.1.40) than the original that Apple bundled (5.0.x).
Server Admin seems to manage only the initial (5.0.x) installation in /usr/bin
So I've STOPPED that version in Server Admin but can't get the new one (in /usr/local/mysql) to work.
Ideally I'd like to point the new version of mysql at the old database files in /var/mysql but not sure how...
Edit: Looks like my new MySQL is active (for some users anyway) but it's pointing to a different data file. It's pointing to /usr/local/mysql/data
and I want it to point to /var/mysql
Admin user can connect but others get: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
. I'm assuming because this new database doesn't have those users enabled yet?!?! though I'd think I could still $ mysql -u root -p
to it?!?
Anyone know how to manage this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
好吧,我将新 MySQL 的
data
目录重命名为data.backup
,然后创建了一个符号链接,从新 MySQL 的数据文件夹所在的位置到/var/mysql< /code> (旧数据文件所在的位置)到目前为止一切顺利...新版本的 MySQL 正在运行并为其数据库使用现有的数据文件...
Well, I renamed the new MySQL's
data
directory todata.backup
and then I created a symlink from where the new MySQL's data folder was to/var/mysql
(where the old data file is) and so far so good... New version of MySQL is running and using the existing data file for its databases...我不确定如何解决您的问题,但也许您可以尝试使用 Homebrew 或其他 OS X 包管理器处理你的软件。
将使未来的升级变得轻而易举。
编辑:抱歉,刚刚意识到您正在使用 OS X SERVER,我不熟悉它,或者您是否应该在其上使用 Homebrew。
I'm not sure how to resolve your issue, but maybe you could trying using Homebrew or another OS X package manager to handle your software.
Will make upgrading in future a breeze.
EDIT: Sorry, just realized you are using OS X SERVER, I'm not familiar with it or if you should be using Homebrew on it.