문제

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?

도움이 되었습니까?

해결책 2

Well, I renamed the new MySQL's data directory to data.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...

다른 팁

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top