We help IT Professionals succeed at work.

help restore my wordpress site made on WAMP

fabian be
fabian be asked
on
206 Views
Last Modified: 2017-03-09
So some months ago, I made an new windows install and copied my entire WAMP folder to an external HDD. When I reinstalled WAMP I just made a copy back and everyting worked fine. At least I think I reinstalled it, iam not even so sure.

Anyway, today I wanted to move my wordpress site to a live webhost. So I followed the steps and it made me login to PHPmyadmin. But for some reason, I could not login with my normal info. So I followed some steps to reset it. And when I did, in my PHPmyadmin, I did not see my wordpress database. When I tried to check if my local wordpress was still working, it did not! It gave error "Error establishing a database connection"But before I even reset this PHPmyadmin stuff, It worked fine!

So what the hell did I just do? Pls tell me I did not delete everything without any hope to recover it!

To recover the password for PHPmyadmin, I followed these steps:

Regaining access to lost MySQL password for PHPMyAdmin on WAMP

But even before I did that, I also followed these instrutions:

Browse to Installed drive:\Wamp\apps\phpmyadmin3.5.1 open config.inc.php
change "auth_type" from cookie to config
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = '';
$cfg['Servers'][$i]['AllowNoPassword'] = false;
Right now, My phpmyadmin config file looks like this:

<?php

/* Servers configuration */
$i = 0;

$cfg['blowfish_secret'] = '---REMOVED FOR EE---'; //What you want

/* Server: localhost [1] */
$i++;
$cfg['Servers'][$i]['verbose'] = 'Local Databases';
$cfg['Servers'][$i]['host'] = '127.0.0.1';
$cfg['Servers'][$i]['extension'] = 'mysqli';
$cfg['Servers'][$i]['auth_type'] = 'cookie';
$cfg['Servers'][$i]['user'] = '---REMOVED FOR EE---';
$cfg['Servers'][$i]['password'] = '---REMOVED FOR EE---';

// Hidden databases in PhpMyAdmin left panel
//$cfg['Servers'][$i]['hide_db'] = '(information_schema|mysql|performance_schema|sys)';

// Allow connection without password
$cfg['Servers'][$i]['AllowNoPassword'] = true;

// Suppress Warning about pmadb tables
$cfg['PmaNoRelation_DisableWarning'] = true;

// To have PRIMARY & INDEX in table structure export
//$cfg['Export']['sql_drop_table'] = true;
//$cfg['Export']['sql_if_not_exists'] = true;

$cfg['MySQLManualBase'] = 'http://dev.mysql.com/doc/refman/5.7/en/';
/* End of servers configuration */

?>
I did made a backup a few days ago of the complete wamp folder, so pls tell me how to make it work again.
Comment
Watch Question

gr8gonzoConsultant
CERTIFIED EXPERT

Commented:
So first, we should recognize that phpMyAdmin is NOT the database itself. MySQL is the database. phpMyAdmin is simply a program that makes it easier to view and manage the data inside your database.

So if you simply reset passwords that are specific to phpMyAdmin, you are not resetting the data itself.

Personally, I usually recommend to people that they use a client-side management program like HeidiSQL instead of phpMyAdmin, because phpMyAdmin sits on the server at all times, exposed, and tends to be a pretty big target for script kiddies / drive-by-hacking, which can put your data at risk. HeidiSQL doesn't sit on the server - it sits on your own computer and simply connects to the database.

That said, it sounds like you have three different phpMyAdmin installations - one for your live web host, one for your new HDD, and one from your backup. It's unclear which specific one you reset your password for. However, if you got into the database and didn't see any data, I'd guess you were looking at the one on your new, live web host, which probably doesn't have your data yet.

I'd start by recommending you download HeidiSQL and try to use it to connect to your local database (127.0.0.1) on WAMP / your new HDD. My guess is that you'll see your data still sitting there. However, let us know what the results are, and then we can recommend next steps.

Author

Commented:
Well to be more clear, I did not access the PHPmyadmin on my webhost yet, I was only just messing with it on my WAMP server. So the local one.

And I had made 2 backups of the entire WAMP folder on an external HDD. Would it work if I just uninstalled WAMP on my PC, then reinstall and move the backup folder over the new installation? Or do I just uninstall WAMP and copy the folder without the reinstall?

I will start by downloading that HeidiSQL like you said, and see what comes up.
gr8gonzoConsultant
CERTIFIED EXPERT

Commented:
So on the new installation, did you copy any of the MySQL database files from your previous installation? If you're only working with a new WAMP installation, then MySQL isn't going to have any data except for its own starting 3 default databases.

Author

Commented:
Well before I reinstalled. I had made several backups of the complete WAMP folder. In my understanding, that includes the folder on C:\Program Files (x86)\WampServer\bin\mysql\mysql5.1.53\data what should be the location for the database files. If that is not the case then I think iam screwed.

Btw I did test with HeidiSQL and I see the same databases, which are missing the ones I need. However maybe I should mention that the account name for my working WAMP PHPmyadmin was fabian, and I did only reset the password for root, so is that maybe a possiblity that I can not see those databases? and only the one for root? Because I still did not access my fabian account for phpmyadmin, and now iam afraid to do anything.

Author

Commented:
Btw here is a screenshot of my databases right now

phpmyadmin.png
Consultant
CERTIFIED EXPERT
Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION

Author

Commented:
OMG I did it. So I still have no idea what caused the problem, probably changing the account name and password in PHPmyadmin. I fixed it by uninstalling and completely remove WAMP from my pc. Then I grabbed the backup folder from my external HDD, and made a copy of that folder back to my PC. I start WAMP, and used the program itself to manually install mysql and apache. I started the services and BAM I can access my site again.

I was in full panic mode when this started, tnx for explaining to me how databases on localhost work. Now I at least know what to backup. Tnx so much for your time and effort.

Gain unlimited access to on-demand training courses with an Experts Exchange subscription.

Get Access
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Empower Your Career
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.