Page 1 of 1

[RE OPENED] Mysql database deactivated

PostPosted: 15. November 2012 19:59
by Marcoevich
Well this is odd, I have xampp running for years without too much problems, but now I'm into something I can't solve on my own.

Today I needed phpmyadmin, so first thing I did was go to /localhost/phpmyadmin in de browser. Now I get a big red warning page saying this:

"Welcome to phpMyAdmin

Error

MySQL said: Documentation
#2002 - Een verbindingspoging is mislukt omdat de verbonden party niet correct heeft geantwoord na een bepaalde tijd, of de gemaakte verbinding is mislukt omdat de verbonden host niet heeft geantwoord.

The server is not responding (or the local server's socket is not correctly configured).
Connection for controluser as defined in your configuration failed."

How can my configuration be incorrect? I have checked everything but I can't get it working...

What I've done so far:

- Checking if my passwords are correct
- Checking if mysql service is running
- Restarting/reinstalling mysql service
- Running mysql without service
- Checked for ports in use and multiple instances of mysql

The point is, I have only one instance of mysql running (as it should be), XAMPP control panel says everything is allright, but none of my applications can reach the database now. Also can't even get a loginscreen of phpmyadmin.

Reinstalling xampp is my last option, I have a difficult configuration and it would take a lot of time to backup and restore everything. Do you think it is possible to restore mysql functionality without a reinstall? if so, what are the steps I need to take to get it working again?

Thank you very much!

Marco

Re: Mysql database deactivated

PostPosted: 16. November 2012 23:59
by Marcoevich
Bump! Is there really no one who has an idea about what could have caused this??

Re: Mysql database deactivated

PostPosted: 18. November 2012 16:26
by JonB
Hello there -

A. Bumping when your post is still on the first page is an almost sure way to be ignored. I'm sure everyone here would like a snappy answer, but resources are limited (see next).
B. Questions on these forums are mostly answered a very small group of volunteers, many of whom have busy professional schedules. They also sometimes have 'lives' and 'families'. Some even work on more than one Open Source project.
C. Some questions require research, and 'link-seeking' (which also takes time)
D. As my friend Altrea would point out, a pleasant salutation is also considered good manners.
E. There is always the option of paying a 'free-lancer' to help you fix your issue if you are in a hurry.

Now about your issue -

The server is not responding (or the local server's socket is not correctly configured).
Connection for controluser as defined in your configuration failed."

My guess is you upgraded and 'smashed' your PMA user. Possible causes - transferring over (or not) the 'pma' user during the upgrade. This is dependent on how you did your upgrade. Did you export/import the 'mysql/user' table?? Do you have the config.inc.php from your old installation?

You can regain access (probably) - you will probably have to look at the MySQL data.

A. by 'fixing' config.inc.php
http://docs.phpmyadmin.net/en/latest/config.html

B. Using the MySQL command line interface to access your MySQL data OR install the MySQL Workbench tool.

http://www.mysql.com/products/workbench/

Good Luck
:)

Re: Mysql database deactivated

PostPosted: 18. November 2012 17:21
by Marcoevich
Thx for your reply JonB. I may have been a bit impatient to you indd. Sorry about that ;)

About my issue; I haven't touched anything afaik. Have been busy with college the last few week so development of my applications is at a bit lower lvl now. Could it be that an external application or an automatic update of something could have caused this?

I can't find anything wrong in config.inc.php so now I am trying to solve this wiht MySQL workbench.

I don't really know where to look for however.. I have a user 'root' with no pass. There can't be anything wrong about that ;)

Re: Mysql database deactivated

PostPosted: 18. November 2012 19:36
by JonB
I didn't ask in the first post -
A. Have you been able to use phpMyAdmin in this installation before?

B. Did you perform a XAMPP upgrade on this machine?

Now - if problem is the ControlUser =

Look in the 'mysql' database (its one of the default databases used by MySQL - look to see if you have a user named 'pma'.

That user is the phpMyAdmin control user. Check the password hash against your 'thought to be' password.

$cfg['Servers'][$i]['controluser']Type: string
Default value: ''

$cfg['Servers'][$i]['controlpass']Type: string
Default value: ''

This special account is used for 2 distinct purposes: to make possible all relational features (see $cfg['Servers'][$i]['pmadb']) and, for a MySQL server running with --skip-show-database, to enable a multi-user installation (HTTP or cookie authentication mode).

When using HTTP or cookie authentication modes (or ‘config’ authentication mode since phpMyAdmin 2.2.1), you need to supply the details of a MySQL account that has SELECT privilege on the mysql.user (all columns except “Password”), mysql.db (all columns) and mysql.tables_priv (all columns except “Grantor” and “Timestamp”) tables. This account is used to check what databases the user will see at login.


I'm not aware of any way to break it other than 'actively'.

You might be able to use the XAMPP Security wizard, it sets the XAMPP, MySQL root, and phpMyadmin PW's - might correct the entries for you.

http://localhost/security/index.php

Good Luck
:)

Re: Mysql database deactivated

PostPosted: 18. November 2012 23:44
by Marcoevich
Hi JonB!

Well, I think that running the xampp security wizard solved my problem ;) I am succesfully able to run phpmyadmin now!

Thank you very much for your help!

Greetings,
Marco

Re: [SOLVED] Mysql database deactivated

PostPosted: 12. December 2012 22:52
by Marcoevich
Oh dear, here we go again. :cry:

Used PHPMyAdmin a lot yesterday. Just browsing a database, nothing more. Now I get this again: "Connection for controluser as defined in your configuration failed."

All Xamp MYSQL databases are deactivated. Changing passwords using xampp security wizzard doesn't work this time..

Any ideas?

Thx!

Marcoevich

Re: [RE OPENED] Mysql database deactivated

PostPosted: 13. December 2012 18:51
by Marcoevich
I've tried this solution: http://www.rvdavid.net/how-to-fix-phpmy ... on-failed/

But doesn't work and I can't find the config-db.php. Does anyone know where that file is?

Re: [RE OPENED] Mysql database deactivated

PostPosted: 13. December 2012 19:07
by Altrea
Hi Marcoevich,

Marcoevich wrote:I can't find the config-db.php. Does anyone know where that file is?

Such a file doesn't exist for phpmyadmin. The default configuration file is the config.inc.php

best wishes,
Altrea

Re: [RE OPENED] Mysql database deactivated

PostPosted: 14. December 2012 00:35
by Marcoevich
Hi Altrea. Found the file and I edited everything as it should be. However, still no luck with logging in :(

Do you have some more ideas?

Thx!

Marcoevich