Subscribe to PHP Freaks RSS

Using MySQL Administrator with WampServer

Print
by MichaƂ Jarosz on Jun 22, 2009 12:38:35 PM - 16,041 views

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.

That would be it ;)

----

MySQL Forums post, where I've found this solution

Comments

DarkSuperHero Sep 26, 2009 1:50:53 PM

Great!!! I just started using MySQL Administrator...and it worked like a charm!
Cheers!

elum.chaitu Sep 4, 2010 8:51:10 AM

Fixed it! Yay! MySQL Administrator was looking for a 'my.cnf' file instead of a 'my.ini' file. To fix the problem follow these steps:

1. Ignore the error message.
2. Goto 'Service Control'
3. Click the 'Configure Service' tab.
4. In the 'Configuration File' section, in the 'Config Filename' text box, change the extension, from '.cnf' to '.ini'
5. Click the 'Apply Changes' button
6. Goto 'File > Reconnect'

Add Comment

Login or register to post a comment.