wampserver和mysql administrator共同使用

来源:互联网 发布:c语言32个关键词 编辑:程序博客网 时间:2024/06/01 09:58

英文原文:

For those readers who do not develop PHP on Windows platform WampServer is probably the most popular Apache + MySQL + PHP package for Windows. MySQL Administrator on the other hand, is a part of MySQL GUI Tools package.

The problem with this pair, is that they don't want to work together. At least not right out of box. MySQL Administrator fails to find mysql service process as installed by WampServer. This leads to infamous 'Could not find settings' error message.
You still will be able to use MySQL Administrator, but some of its features will be unavailable - among them quite important 'Startup variables' that lets you configure your server.
The reason is simple. WampServer keeps MySQL's config file in a directory, that is not checked by MySQL Administrator's searching algorithm.
Luckily, the solution is also simple.
Open registry editor
Windows XP: Go to Start > Run... type in regedit and press Enter
Vista: Go to Start, type regedit into search box and press Enter
A word of warning: be careful when using registry editor, as you might break your system if you change wrong variables.
Using tree on the left go to:
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\wampmysqld
In the window on the right find ImagePath variable, double click it's name.
In the dialog that opens you should see something like this:
c:\wamp\bin\mysql\mysql5.1.33\bin\mysqld.exe wampmysqld
(MySQL's version may vary)
Change it like this:
"c:\wamp\bin\mysql\mysql5.1.33\bin\mysqld.exe" --defaults-file="c:\wamp\bin\mysql\mysql5.1.33\my.ini" wampmysqld
(be careful not to miss any double quotes!
Close registry editor, then restart you MySQL server from WampServer's tray menu.
MySQL Administrator should work fine now.


翻译:

为了解决wampserver和mysql administrator无法共同使用的问题(mysql administrator会提示无法找到服务器),需要在注册列表中将“HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\wampmysqld”这一项的“ ImagePath”元素的值从

c:\wamp\bin\mysql\mysql5.1.33\bin\mysqld.exe wampmysqld

改为

"c:\wamp\bin\mysql\mysql5.1.33\bin\mysqld.exe" --defaults-file="c:\wamp\bin\mysql\mysql5.1.33\my.ini" wampmysqld

注意保留双引号。

修改后重启mysql server就可以了。

0 0
原创粉丝点击