SlackPack wrote:I just installed xampp 1.5.3a and from the control page -> status tab, it shows that MySQL is "deactivated". mysql_start.bat is already up and running, what am I doing wrong?
I have just spent some time replicating this mySQL "
DEACTIVATED" issue in the Status page and have been able to turn it on and off at will.
Here is what I found.
The mySQL user
pma must not have been removed from any part of your mySQL/phpMyAdmin configurations or it will give the
RED flag.
Check these items:
1. Open
xampp/htdocs/xampp/mysql.php in your fav. text editor.
That is what it should look like.
- Code: Select all
<?php
if (@mysql_connect("localhost", "pma", "")) {
echo "OK";
} else {
echo "NOK";
}
?>
2. Open
xampp/phpmyadmin/config.inc.php in your fav. text editor.
This is what this part should look like.
- Code: Select all
$cfg['Servers'][$i]['controluser'] = 'pma'; // MySQL control user settings
// (this user must have read-only
$cfg['Servers'][$i]['controlpass'] = ''; // access to the "mysql/user"
// and "mysql/db" tables).
// The controluser is also
// used for all relational
// features (pmadb)
3. Open
phpMyAdmin from the
XAMPP Welcome (Admin) Page in your fav browser.
Click on
Privileges in the main frame.
Check you have this:
User/pma - Host/localhost - Password/NO - Global Privileges/SHUTDOWN - Grant/NO
If all the above are intact you should get the "
ACTIVATED" in the Status page.
Now you may have added a
root user password to improve the security of your mySQL server. In certain instances this may prevent the user
pma from connecting to mySQL.
If you try this, then you will see how it is possible to turn the
RED flag to Green at will, just like I did, to test out the above 3 checks.
Again in your fav. text editor open
xampp/htdocs/xampp/mysql.phpChange this line:
- Code: Select all
if (@mysql_connect("localhost", "pma", "")) {
to this:
- Code: Select all
if (@mysql_connect("localhost", "root", "EnterYourRootPasswordHere")) {
Save it and try your Status page again. It should display the
GREEN flag if you had a
RED flag before.
Change it back and it should go
RED again.
This was how I detected I had a user
pma issue somewhere in my configurations.
I had deleted the
pma user from the
config.inc.php file and the
pma user in my phpMyAdmin
Privileges table.
I reinstated all the
pma users and now I have all
GREEN flags in the Status page.