Power Failure then "Error establishing a database connection"
Posted by: freespirit (---.plus.com)
Date: July 20, 2017 11:00PM

Wamp Vs 3 32bit, Apache 2.4.17, PHP 5.6, My Sql 5.7.9
Windows 7, 32 bit

Working Perfectly then power failure. Rebooted server, clicked my website to get this.
Error establishing a database connection.

I launch phpmyadmin to login only to get !Cannot log in to the MySQL server.

I have looked online and a lot of the recommendations are for changing the password and I really don't think it is that. I don't mind doing it if I have to but would rather be guided through it if there is no other solution.

Any help would be appreciated as my site is down and people are asking why and I don't know.

The icon is Green and all services appear to be running.

regards
freespirit



Edited 1 time(s). Last edit at 07/20/2017 11:01PM by freespirit.

Options: ReplyQuote
Re: Power Failure then "Error establishing a database connection"
Posted by: RiggsFolly (Moderator)
Date: July 21, 2017 10:27AM

It is likely a database corruption and the auto recoevery has failed.

Look in the mysql error log and see what it is telling you. Then check with the MySQL Documentation on a recoevery stratagy.

See my signature for links to the MySQL Manual. And the note about regular backups of databases even when developing.

---------------------------------------------------------------------------------------------
(Windows 7 Pro 32bit) (Wampserver 3.0.6 32bit)
<Apache 2.4.23/2.2.31> <PHP 7.1.2/7.0.16/5.6.28/5.5.38/5.4.45/5.3.29> <MySQL 5.7.10/5.6.17/5.5.28>
<MariaDB 10.1.21> <phpMyAdmin4.7.5> <MySQL Workbench 6.3.6.511>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin -- WAMPServer alternate Repo
-?-?-?- Backup your MySQL databases regularly Here is How dont regret it later! Yes even when developing -?-?-?-

Options: ReplyQuote
Re: Power Failure then "Error establishing a database connection"
Posted by: freespirit (---.plus.com)
Date: July 21, 2017 02:13PM

Hi Riggs Folly,

Thank you for replying, as usual.

I've looked at the log, I only have 7 lines with line 6 and 7 saying

InnoDB: Progress in percent: 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99
2017-03-15T12:00:51.114257Z 0 [Warning] wampmysqld: Forcing close of thread 9 user: 'adminmoi'

i have no idea what this means and the reference manual looks like information overload for me with no idea of where to start. Im sorry, im not a developer so I don't undertstand what I am seeing.

Would it be simpler to uninstall and install the latest version of wamp?

Options: ReplyQuote
Re: Power Failure then "Error establishing a database connection"
Posted by: RiggsFolly (Moderator)
Date: July 21, 2017 03:33PM

If you dont mind loosing the data, it probably would be easier to install the latest version.

If you took a backup before things went wrong, you should be able to restore that to the new database

---------------------------------------------------------------------------------------------
(Windows 7 Pro 32bit) (Wampserver 3.0.6 32bit)
<Apache 2.4.23/2.2.31> <PHP 7.1.2/7.0.16/5.6.28/5.5.38/5.4.45/5.3.29> <MySQL 5.7.10/5.6.17/5.5.28>
<MariaDB 10.1.21> <phpMyAdmin4.7.5> <MySQL Workbench 6.3.6.511>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin -- WAMPServer alternate Repo
-?-?-?- Backup your MySQL databases regularly Here is How dont regret it later! Yes even when developing -?-?-?-

Options: ReplyQuote
Re: Power Failure then "Error establishing a database connection"
Posted by: freespirit (---.plus.com)
Date: July 21, 2017 03:41PM

Hi Riggs,

thanks for that. yes, I back up regularly. Ill do that, alot simpler n thank you again.

regards
freesp

Options: ReplyQuote


Sorry, only registered users may post in this forum.