I downloaded and installed MySQL 5.1.47 for OS X 10.6 using the DMG archive:
我使用DMG档案下载并安装了OS X 10.6的MySQL 5.1.47:
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.
我也安装MySQL。prefPane MySQLStartupItem.pkg。MySQL。预制窗格是一个首选窗格。问题是,每当我试图从首选项窗格中启动/停止MySQL时,系统首选项就会挂起。它永远以大约50%的CPU运行,最终我将强制退出系统首选项。如果我切换到“在启动时自动启动MySQL服务器”,也会发生同样的事情。基本上,MySQL首选项窗格没有任何功能。
Note that I have no problem starting MySQL from the command line:
注意,从命令行启动MySQL没有问题:
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.
我试过重新安装MySQL和Preference面板。我使用的是标准的安装位置,没有什么不同。每次MySQL首选项窗格挂起时。
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.
我在一台运行OS X 10.6.3的Macbook Pro (Intel)上做这个。这台机器上没有旧版本的MySQL。
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.
后续报道:现在是2012年1月,所以我想看看这个问题是否已经解决。我在OS X 10.6.8上尝试了最新的MySQL 5.5.20,但它还是坏了——同样的行为,它只是挂起(不得不强制退出)。我尝试了杰米·王和卡罗安达的建议,但都没有用。
7 个解决方案
#1
7
Under OS X Lion the following worked for me:
在OS X Lion系统下,我的工作如下:
edit /usr/local/mysql/support-files/mysql.server
编辑/usr/local/mysql/support-files / mysql.server
change lines ~ 46 & 47
换行~ 46和47
basedir=
datadir=
to
来
basedir=/usr/local/mysql
datadir=/usr/local/mysql/data
#2
6
For anyone still encountering this problem, see: http://bugs.mysql.com/bug.php?id=53232
对于仍然遇到这个问题的人,请参见:http://bugs.mysql.com/bug.php?id=53232
Specifically, here's Rembert Oldenboom's response:
具体来说,莱姆伯特·奥尔登布姆(Rembert Oldenboom)的回应是:
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:
mysql 5.5.8在mbp i7 2.8上的新版本仍然存在。在其他人的评论下,解决办法很简单:
Edit /usr/local/mysql/support-files/mysql.server Search for "Set some defaults" about 4 lines down, replace the line
编辑/usr/local/mysql/support-files / mysql。服务器搜索“设置一些默认值”约4行,替换行
basedir=.
basedir =。
with
与
basedir=/usr/local/mysql
basedir = / usr /地方/ mysql
Then search for "Set pid file if not given" about 3 lines down, replace the line
然后搜索“设置pid文件,如果没有给出”大约3行,替换行
mysqld_pid_file_path=$datadir/`hostname`.pid
mysqld_pid_file_path = $ datadir / .pid主机名
with
与
mysqld_pid_file_path=$datadir/`/bin/hostname`.pid
mysqld_pid_file_path = $ datadir / .pid / bin /主机名
Now the prefPane will work.
现在预制板可以工作了。
#3
1
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.
我已经安装并重新安装了MySQL 5.5.15,使用了我在网上找到的一些技巧。我发现,在双击.dmg文件中的preferences窗格安装后,选择“为该机器的所有用户安装”而不是“仅为当前用户安装”,可以使其工作。这是我在雪豹上安装MySQL时唯一改变的一步。
#4
0
Are you sure that panther supports 64 bits apps ?
你确定黑豹支持64位应用程序吗?
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"
当我试图在雪豹上打开一个32位的首选项窗格时,首选项窗格说"这个窗格是32位的,你有一个64位的macos,我重新启动这个窗格"
Maybe it's hanging because it's the opposite ? getting 32bits preference pane and trying to open a 64bits pane ?
也许它是挂着的,因为它是相反的?获取32位的首选项窗格并尝试打开64位窗格?
#5
0
I had this problem too. It turned out that I installed the 32 bit MySQL server on my 64 bit Mac on accident. Woops! I would recommend verifying your processor type (32 or 64 bit) and reinstalling the according MySQL DMG.
我也有这个问题。结果我意外地在我的64位Mac上安装了32位的MySQL服务器。糟糕!我建议验证您的处理器类型(32或64位)并重新安装根据MySQL DMG。
It took me a couple of days to figure this out! MySQL was still running fine in the background, it's just the preference pane and connecting to it via terminal that would not work.
我花了几天时间才弄明白!MySQL仍然在后台运行良好,它只是一个首选项窗格,通过终端连接到它不能工作。
I hope this works for you!
我希望这对你有用!
#6
0
This worked for me :
这对我很有效:
sudo /Applications/XAMPP/xamppfiles/bin/mysql.server start
Problem I recognised was of permission to mysql.server
我意识到的问题是对mysql.server的许可
#7
0
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
编辑/usr/local/mysql/support-files / mysql.server
change lines ~ 46 & 47
换行~ 46和47
basedir= datadir=
basedir = datadir =
to
来
basedir=/usr/local/mysql datadir=/usr/local/mysql/data
basedir = / usr /地方/ mysql datadir = / usr /地方/ mysql /数据
AND updated my my.cnf.
和更新。我my . cnf中所做
I had a default-time-zone set to UTC. I had to comment out that line.
我有一个默认时区设置为UTC。我必须把这句话注释掉。
default-time-zone = UTC
to
来
# default-time-zone = UTC
#时区= UTC
Start server using plist file (check your plist path/name!):
使用plist文件启动服务器(检查您的plist路径/名称!)
sudo launchctl load -w /Library/LaunchDaemons/com.oracle.oss.mysql.mysqld.plist
sudo launchctl加载-w /Library/LaunchDaemons/com.oracle.oss.mysql.mysqld.plist
I then loaded MySQL time zone tables from Mac OS time zone files:
然后从Mac OS时区文件加载MySQL时区表:
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.
然后,我停止了MySQL,并使用我的plist文件重新启动。
sudo launchctl unload -w /Library/LaunchDaemons/com.oracle.oss.mysql.mysqld.plist
sudo launchctl卸载-w /Library/LaunchDaemons/com.oracle.oss.mysql.mysqld.plist
sudo launchctl load -w /Library/LaunchDaemons/com.oracle.oss.mysql.mysqld.plist
sudo launchctl加载-w /Library/LaunchDaemons/com.oracle.oss.mysql.mysqld.plist
After that, I was able to stop/start using the preference panel!
之后,我可以停止/开始使用首选项面板!
#1
7
Under OS X Lion the following worked for me:
在OS X Lion系统下,我的工作如下:
edit /usr/local/mysql/support-files/mysql.server
编辑/usr/local/mysql/support-files / mysql.server
change lines ~ 46 & 47
换行~ 46和47
basedir=
datadir=
to
来
basedir=/usr/local/mysql
datadir=/usr/local/mysql/data
#2
6
For anyone still encountering this problem, see: http://bugs.mysql.com/bug.php?id=53232
对于仍然遇到这个问题的人,请参见:http://bugs.mysql.com/bug.php?id=53232
Specifically, here's Rembert Oldenboom's response:
具体来说,莱姆伯特·奥尔登布姆(Rembert Oldenboom)的回应是:
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:
mysql 5.5.8在mbp i7 2.8上的新版本仍然存在。在其他人的评论下,解决办法很简单:
Edit /usr/local/mysql/support-files/mysql.server Search for "Set some defaults" about 4 lines down, replace the line
编辑/usr/local/mysql/support-files / mysql。服务器搜索“设置一些默认值”约4行,替换行
basedir=.
basedir =。
with
与
basedir=/usr/local/mysql
basedir = / usr /地方/ mysql
Then search for "Set pid file if not given" about 3 lines down, replace the line
然后搜索“设置pid文件,如果没有给出”大约3行,替换行
mysqld_pid_file_path=$datadir/`hostname`.pid
mysqld_pid_file_path = $ datadir / .pid主机名
with
与
mysqld_pid_file_path=$datadir/`/bin/hostname`.pid
mysqld_pid_file_path = $ datadir / .pid / bin /主机名
Now the prefPane will work.
现在预制板可以工作了。
#3
1
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.
我已经安装并重新安装了MySQL 5.5.15,使用了我在网上找到的一些技巧。我发现,在双击.dmg文件中的preferences窗格安装后,选择“为该机器的所有用户安装”而不是“仅为当前用户安装”,可以使其工作。这是我在雪豹上安装MySQL时唯一改变的一步。
#4
0
Are you sure that panther supports 64 bits apps ?
你确定黑豹支持64位应用程序吗?
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"
当我试图在雪豹上打开一个32位的首选项窗格时,首选项窗格说"这个窗格是32位的,你有一个64位的macos,我重新启动这个窗格"
Maybe it's hanging because it's the opposite ? getting 32bits preference pane and trying to open a 64bits pane ?
也许它是挂着的,因为它是相反的?获取32位的首选项窗格并尝试打开64位窗格?
#5
0
I had this problem too. It turned out that I installed the 32 bit MySQL server on my 64 bit Mac on accident. Woops! I would recommend verifying your processor type (32 or 64 bit) and reinstalling the according MySQL DMG.
我也有这个问题。结果我意外地在我的64位Mac上安装了32位的MySQL服务器。糟糕!我建议验证您的处理器类型(32或64位)并重新安装根据MySQL DMG。
It took me a couple of days to figure this out! MySQL was still running fine in the background, it's just the preference pane and connecting to it via terminal that would not work.
我花了几天时间才弄明白!MySQL仍然在后台运行良好,它只是一个首选项窗格,通过终端连接到它不能工作。
I hope this works for you!
我希望这对你有用!
#6
0
This worked for me :
这对我很有效:
sudo /Applications/XAMPP/xamppfiles/bin/mysql.server start
Problem I recognised was of permission to mysql.server
我意识到的问题是对mysql.server的许可
#7
0
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
编辑/usr/local/mysql/support-files / mysql.server
change lines ~ 46 & 47
换行~ 46和47
basedir= datadir=
basedir = datadir =
to
来
basedir=/usr/local/mysql datadir=/usr/local/mysql/data
basedir = / usr /地方/ mysql datadir = / usr /地方/ mysql /数据
AND updated my my.cnf.
和更新。我my . cnf中所做
I had a default-time-zone set to UTC. I had to comment out that line.
我有一个默认时区设置为UTC。我必须把这句话注释掉。
default-time-zone = UTC
to
来
# default-time-zone = UTC
#时区= UTC
Start server using plist file (check your plist path/name!):
使用plist文件启动服务器(检查您的plist路径/名称!)
sudo launchctl load -w /Library/LaunchDaemons/com.oracle.oss.mysql.mysqld.plist
sudo launchctl加载-w /Library/LaunchDaemons/com.oracle.oss.mysql.mysqld.plist
I then loaded MySQL time zone tables from Mac OS time zone files:
然后从Mac OS时区文件加载MySQL时区表:
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.
然后,我停止了MySQL,并使用我的plist文件重新启动。
sudo launchctl unload -w /Library/LaunchDaemons/com.oracle.oss.mysql.mysqld.plist
sudo launchctl卸载-w /Library/LaunchDaemons/com.oracle.oss.mysql.mysqld.plist
sudo launchctl load -w /Library/LaunchDaemons/com.oracle.oss.mysql.mysqld.plist
sudo launchctl加载-w /Library/LaunchDaemons/com.oracle.oss.mysql.mysqld.plist
After that, I was able to stop/start using the preference panel!
之后,我可以停止/开始使用首选项面板!