Mac OS X, MySQL Preference Pane doesn't work

2020-02-23 06:47发布

I downloaded and installed MySQL 5.1.47 for OS X 10.6 using the DMG archive:

mysql-5.1.47-osx10.6-x86_64.dmg

I also installed MySQL.prefPane and MySQLStartupItem.pkg. MySQL.prefPane is a Preference Pane. The problem is, whenever I attempt to start/stop MySQL from the Preference Pane, System Preferences just hangs. It runs at about 50% CPU forever, eventually I have for force quit System Preferences. The same thing happens if I toggle "Automatically Start MySQL Server on Startup". Basically the MySQL Preference Pane is not functional.

Note that I have no problem starting MySQL from the command line:

sudo /usr/local/mysql/bin/mysqld_safe

I have tried reinstalling MySQL and the Preference Pane. I'm using the standard installation location, nothing out of the ordinary. Every time the MySQL Preference Pane just hangs.

I'm doing this on a Macbook Pro (Intel) running OS X 10.6.3. There are no old versions of MySQL on this machine.

Follow-up: Well it's now January 2012 so I figure I'd check to see if this has been fixed. I tried the latest MySQL 5.5.20 on OS X 10.6.8 and it's still broken - same behavior, it just hangs (had to force quit). I tried Jamie Wong's and carloandaya's suggestions, both did not work.

标签: mysql macos
8条回答
祖国的老花朵
2楼-- · 2020-02-23 06:56

Under OS X Lion the following worked for me:

edit /usr/local/mysql/support-files/mysql.server

change lines ~ 46 & 47

basedir=
datadir=

to

basedir=/usr/local/mysql
datadir=/usr/local/mysql/data
查看更多
甜甜的少女心
3楼-- · 2020-02-23 06:59

old stack overflow post! The world has changed a great deal, and I wanted to share my solution to this problem. The issue for me was the time zone tables AND Stephen's answers.

I did:

edit /usr/local/mysql/support-files/mysql.server

change lines ~ 46 & 47

basedir= datadir=

to

basedir=/usr/local/mysql datadir=/usr/local/mysql/data

AND updated my my.cnf.

I had a default-time-zone set to UTC. I had to comment out that line.

default-time-zone = UTC 

to

# default-time-zone = UTC

Start server using plist file (check your plist path/name!):

sudo launchctl load -w /Library/LaunchDaemons/com.oracle.oss.mysql.mysqld.plist

I then loaded MySQL time zone tables from Mac OS time zone files:

mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql -u root --password="YOUR_PASSWORD_HERE" mysql

I then stopped MySQL and restarted using my plist file.

sudo launchctl unload -w /Library/LaunchDaemons/com.oracle.oss.mysql.mysqld.plist

sudo launchctl load -w /Library/LaunchDaemons/com.oracle.oss.mysql.mysqld.plist

After that, I was able to stop/start using the preference panel!

查看更多
淡お忘
4楼-- · 2020-02-23 07:04

I've installed and re-installed MySQL 5.5.15 using some of the tips that I found on the net. I found that selecting "install for all users of this machine" rather than "install only for current user" after double-clicking the preferences pane installation from the .dmg file makes it work. It's the only step that I changed in my many installations of MySQL on Snow Leopard.

查看更多
我命由我不由天
5楼-- · 2020-02-23 07:07

For anyone still encountering this problem, see: http://bugs.mysql.com/bug.php?id=53232

Specifically, here's Rembert Oldenboom's response:

Issue still exists with mysql 5.5.8 on brand new on mbp i7 2.8. With the comments of others the fix was easy:

Edit /usr/local/mysql/support-files/mysql.server Search for "Set some defaults" about 4 lines down, replace the line

basedir=.

with

basedir=/usr/local/mysql

Then search for "Set pid file if not given" about 3 lines down, replace the line

mysqld_pid_file_path=$datadir/`hostname`.pid

with

mysqld_pid_file_path=$datadir/`/bin/hostname`.pid

Now the prefPane will work.

查看更多
霸刀☆藐视天下
6楼-- · 2020-02-23 07:08

This worked for me :

sudo /Applications/XAMPP/xamppfiles/bin/mysql.server start

Problem I recognised was of permission to mysql.server

查看更多
Explosion°爆炸
7楼-- · 2020-02-23 07:12

Are you sure that panther supports 64 bits apps ?

Seems that when a I'm trying to open a 32 bits preference pane on snow leopard, the preference pane says "well this pane is 32bits, and you've got a 64bits macos, I'm restarting this pane"

Maybe it's hanging because it's the opposite ? getting 32bits preference pane and trying to open a 64bits pane ?

查看更多
登录 后发表回答