Pages: Previous123Next
Current Page: 2 of 3
Re: Reinstalled WAMP but not reconnecting to database files
Posted by: DavidBorrink (---.dhcp.aldl.mi.charter.com)
Date: May 19, 2016 08:16PM

Thanks for the information. I did more reading and found out that the .idb and .frm files are complicated to re-set and import. So that's out.

I followed your instructions above. I set aside the data and wordpress files in another place, uninstalled WAMP and removed the wamp folder.

Then I downloaded and installed a new wamp. I activated it through the tray menu and it came up. No problem. I can even launch PHPMyAdmin. So now to get 5.6.12 back in and recognized like the other day...

I copied all the wordpress core files to the www folder, and copied the 5.6.12 folder to the bin/mysql folder, and it sits next to the 5.6.17 folder. I also made sure I had a copy of wampserver.conf inside the 5.6.12 folder (next to the data and my.ini file as you instructed me to do the other day....

>"Does the mysql5.6.12 folder contain a file called `wampserver.conf?

>If not copy the one from mysql.5.6.17 into mysql5.6.12 then exit and restart WampServer. "


The my.ini has the right configuration in it...

# The MySQL server
[wampmysqld]
port = 3306
socket = /tmp/mysql.sock
key_buffer = 16M
max_allowed_packet = 1M

sort_buffer_size = 512K
net_buffer_length = 8K
read_buffer_size = 256K
read_rnd_buffer_size = 512K
myisam_sort_buffer_size = 8M
basedir=c:/wamp/bin/mysql/mysql5.6.12
log-error=c:/wamp/logs/mysql.log
datadir=c:/wamp/bin/mysql/mysql5.6.12/data

lc-messages-dir=c:/wamp/bin/mysql/mysql5.6.12/share


I made sure all the references for 5.6.12 are in there.

Then I restarted wampserver, but 5.6.12 is not coming up as a version. I closed and tried again. No 5.6.12 in the versions. And we had 5.6.12 as a choice the other day, and at that time I went to choose it but got an error message.

And I know I made no changes to the 5.6.12 files.

Boy we seem to be so close to me being able to access that database. We got WAMP running this time, and I can launch PHPMyAdmin. I don't understand why my 5.6.12 files could be recognized the other day, but now they're not.

But WAMP is running.

I'll be glad to send you links to some screen shots of my 5.6.12 directory in order to let you know what file names are in there.



Edited 1 time(s). Last edit at 05/20/2016 05:08AM by DavidBorrink.

Options: ReplyQuote
Re: Reinstalled WAMP but not reconnecting to database files
Posted by: DavidBorrink (---.dhcp.aldl.mi.charter.com)
Date: May 20, 2016 08:41PM

Here are three screen shots of the complete contents of my 5.6.12 folder

Main folder level: [www.artsandletters.biz]

Inside the data folder: [www.artsandletters.biz]

Inside the wordpress folder which is inside the data folder: [www.artsandletters.biz]

And obviously everything else in my wamp installation is a fresh out-of-the-box install from yesterday, so you know what's in those.

Options: ReplyQuote
Re: Reinstalled WAMP but not reconnecting to database files
Posted by: RiggsFolly (Moderator)
Date: May 21, 2016 12:16AM

Yea, from the look of those folders your database was made up of INNODB tables.

Data in a innodb table goes into a file in \data called ibdata1 and you dont have that any longer. So you data is gone.

The files you have are just schema information and not data.

---------------------------------------------------------------------------------------------
(Windows 10 Pro 64bit) (Wampserver 3.3.4 64bit) Aestan Tray Menu 3.2.5.4
<Apache versions MULTIPE> <PHP versions MULTIPLE> <MySQL Versions MULTIPLE>
<MariaDB versions MULTIPLE> <phpMyAdmin versions MULTIPLE> <MySQL Workbench 8.0.23>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin
Get your Apache/MySQL/mariaDB/PHP ADDONs here from the WAMPServer alternate Repo
-X-X-X- Backup your databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-

Options: ReplyQuote
Re: Reinstalled WAMP but not reconnecting to database files
Posted by: DavidBorrink (---.dhcp.aldl.mi.charter.com)
Date: May 21, 2016 03:15AM

Even though the second screen shows 30+ mysqlbin files, and mysql-bin.ooooo2 shows over 28 megabytes of information? I look at the wordpress files in the wordpress folder and I see three files named comments, postmeta, and posts, and they have a lot of data in them.

That surprises me that it would mean there is no data left. What would be in those files to make them so large?

Options: ReplyQuote
Re: Reinstalled WAMP but not reconnecting to database files
Posted by: RiggsFolly (Moderator)
Date: May 21, 2016 02:30PM

Actually you are right I forgot about the changes in MYSQL5.6 that defaults to `innodb_file_per_table`

However the \data\ibdata1 file also maintains a sort of controlling brief keeping various meta data about these database tablespaces in .ibd files

I think your data can be recovered but you are going to have to do a lot of reading of the manual to be able to do it.

Please keep a log of what worked, we would love to see it posted here for others to benefit from.

---------------------------------------------------------------------------------------------
(Windows 10 Pro 64bit) (Wampserver 3.3.4 64bit) Aestan Tray Menu 3.2.5.4
<Apache versions MULTIPE> <PHP versions MULTIPLE> <MySQL Versions MULTIPLE>
<MariaDB versions MULTIPLE> <phpMyAdmin versions MULTIPLE> <MySQL Workbench 8.0.23>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin
Get your Apache/MySQL/mariaDB/PHP ADDONs here from the WAMPServer alternate Repo
-X-X-X- Backup your databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-

Options: ReplyQuote
Re: Reinstalled WAMP but not reconnecting to database files
Posted by: DavidBorrink (---.dhcp.aldl.mi.charter.com)
Date: May 21, 2016 03:56PM

Good. I knew the data had to be "okay". Since those files were so big, it all had to be there. Since a WAMP uninstall leaves those data files and the www folder, it would make no sense for the data to be useless, or gone.

I did read the other day of someone who re-created the database from .ibd and .frm files, and it did sound a little technical to me. I'll look into that. Their info did mention something about table spaces being an issue.

I appreciate your honesty and your attempts to help me out here. I'm going to archive the folders from my original install and look into this. At least I know our data isn't gone, so it's a matter of getting info on how to do it.

Options: ReplyQuote
Re: Reinstalled WAMP but not reconnecting to database files
Posted by: DavidBorrink (---.dhcp.aldl.mi.charter.com)
Date: October 23, 2016 04:56AM

And several months later, I'm back. It's been an adventure. I have researched a bunch of methods, and they involve getting dirty with MySQL Utilities, and it's been a slow process with back-and-forth on a couple different boards.

But tonight I found a new method and it involves trying it on WAMP again. I tried it, but it appears to be running into a road block. Here's what it involves....

1) Setting up a new installation of WAMP --- which I already did last spring when I reinstalled WAMP after the improper uninstall of 5.6.12. I have a fresh 5.6.17 installation which does work.

2) Installing WordPress on the 5.6.17 setup. I did that this evening and it works with a fresh install and a new database called "wordpress", which is the same name as the old setup.

3) Here's the trick... collecting all the .frm, .opt and .ibd files from the database folder on the 5.6.12 setup (which is what remained from the uninstall) and replace the newly created database files in the same location on the 5.6.17 setup, then...

4) Go into PHPMyAdmin on 5.6.17, select the new "wordpress" database and run the following set of prompts in the SQL window:

alter table wp_commentmeta import tablespace;
alter table wp_comments import tablespace;
alter table wp_links import tablespace;
alter table wp_options import tablespace;
alter table wp_postmeta import tablespace;
alter table wp_posts import tablespace;
alter table wp_terms import tablespace;
alter table wp_term_relationships import tablespace;
alter table wp_term_taxonomy import tablespace;
alter table wp_usermeta import tablespace;
alter table wp_users import tablespace;


This is supposedly to bring the data into the idbdata file and restore the connections, if I understand it right. The guy who posted it up said he was successful. But there's one catch.... he was doing this on a XAMMP setup.

I thought, "well, let's try this in MAMP. I've got nothing to lose."


So I went to my 5.6.12 folders, found the "wordpress" folder in the "data" folder and copied it. I then made a backup copy of the 5.6.17 setup's "wordpress" folder (which is the new clean install file) and replaced the "wordpress" folder with the 5.6.12 version. I could not do this while the site was active in a browser window (Windows said the files were active) so I closed it and went to the PHPMyAdmin area. Windows then let me overwrite the files in 5.6.17.

All set. Now time to go PHPMyAdmin. Now the problem: the Aestan tray icon was now red. And PHPMyAdmin would not respond. I shut down WAMP.

So I replaced the 5.6.17 files back again to their "clean install" database files. Restarted WAMP and the tray menu went green. Okay, so WAMP isn't broke.

Next attempt: move the files while WAMP is off. I clicked to launch WAMP and the tray menu stayed yellow. Then I tried PHPMyAdmin and got this error:

------------
Error

MySQL said: Documentation
#2002 - No connection could be made because the target machine actively refused it.

The server is not responding (or the local server's socket is not correctly configured).
-------------

But if I go back to "default" on the database on 5.6.17 everything works fine. I find this baffling. If I'm replacing files with identical names, why would WAMP refuse to load? I'm not even trying to load localhost/wordpress when I launch. I'm just trying to load localhost and get the WAMP main screen.

Any ideas why this is happening? I thought I was going to have a breakthrough. So I've come back to you for your thoughts.

Thanks!

- David



Edited 2 time(s). Last edit at 10/23/2016 05:02AM by DavidBorrink.

Options: ReplyQuote
Re: Reinstalled WAMP but not reconnecting to database files
Posted by: Otomatic (Moderator)
Date: October 23, 2016 10:00AM

Hi,

The only method to transfer a database between different versions of MySQL is the export / import into an SQL file.
Any other method, such as copying files is to more or less long term, doomed to failure.

---------------------------------------------------------------
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons

Options: ReplyQuote
Re: Reinstalled WAMP but not reconnecting to database files
Posted by: DavidBorrink (204.38.30.---)
Date: October 25, 2016 08:43PM

I understand that, of course.

What I'm asking is if I have these folders in my 5.6.17 setup:

- Folder - "wordpress"
- Documents inside - all the .ibd and .frm files plus .opt files of a standard brand new Wordpress installation with no content changes "fresh install"

And all I do is replace them with the **exact same named files** from my 5.6.12 setup (which have all the data of my old site), then why when I choose "start up services" would WAMP refused to go to a green icon in my Aestan tray menu? This is just to get WAMP started, and not choose a web site.

But if I put the original .frm, .ibd, and .opt files back in the 5.6.17 "wordpress" folder, WAMP immediately goes up, even though I'm not going into my WordPress site. I can go into PHPAdmin with no problem then.

If my files have the same names, and I'm not even trying to launch WordPress but go directly to PHPMyAdmin, how would those files, not the contents, change how my WAMP is acting?

Does WAMP read the contents of all files when it launches, even if I don't go into a site?



Edited 1 time(s). Last edit at 10/25/2016 08:45PM by DavidBorrink.

Options: ReplyQuote
Re: Reinstalled WAMP but not reconnecting to database files
Posted by: Otomatic (Moderator)
Date: October 26, 2016 10:18AM

Hi,

A MySQL database is not only some folders named with the table names with *.frm, *.ibd and *.opt files inside, but also files like ib_buffer_pool, ib_logfile0, ib_logfile1, ibdata1 in the mysql5.6.12/data/ folder.
And all of these files is required for the database is functional.

Rather than transfer files, I think it would be better to try, with functional MySQL (5.6.17) to try to use the "database" of the 5.6.12 release.

Suppose the remaining data from the 5.6.12 version is:
c:\wamp_old\bin\mysql\mysql5.6.12\data\

- Exit Wampserver
- Edit the c:\wamp\bin\mysql\mysql5.6.17\my.ini file
Replace :
datadir="c:/wamp/bin/mysql/mysql5.6.17/data"
by
;datadir="c:/wamp/bin/mysql/mysql5.6.17/data"
datadir="c:/wamp_old/bin/mysql/mysql5.6.12/data"
Save the modified file.
Launch Wampserver
May be the old databases will be there.

---------------------------------------------------------------
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons

Options: ReplyQuote
Re: Reinstalled WAMP but not reconnecting to database files
Posted by: Otomatic (Moderator)
Date: October 27, 2016 03:50PM

Hi,

Another solution may be to install the addon MySQL 5.6.12 then modifiy, in my.ini of this version 5.6.12 the line :
datadir="c:/wamp/bin/mysql/mysql5.6.12/data"
by
;datadir="c:/wamp/bin/mysql/mysql5.6.12/data"
datadir="c:/wamp_old/bin/mysql/mysql5.6.12/data"

---------------------------------------------------------------
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons

Options: ReplyQuote
Re: Reinstalled WAMP but not reconnecting to database files
Posted by: DavidBorrink (---.dhcp.aldl.mi.charter.com)
Date: October 28, 2016 10:56PM

I see what you're saying in the suggestion, two note up. To recap my situation: my 5.6.12 installation only has this in the data folder:

- auto.cnf
- 35 mysql.bin00000x documents
- a .pid file
- the "wordpress" database folder with all the .ibd, .frm, and db.opt files

That's what was left when I uninstalled WAMP because the Aestan tray menu failed.

So if I use you method...it will look in the 5.6.12 data folder but not find an ibdata file to work with.


The method I found was suggesting that I replace the 5.6.17 database .frm and .ibd files with the ones left over in the 5.6.12 database and that by going into PHPMyAdmin, I'd be able to run a set of SQL commands to import the data from those files into the ibdata file.

My problem was that the WAMP server would not load (green icon in the Aestan tray menu) when I swapped out those .frm and .ibd files even though they had the exact same names. But if I replace the original 5.6.17 files back, WAMP launches quickly and fine.

Options: ReplyQuote
Re: Reinstalled WAMP but not reconnecting to database files
Posted by: DavidBorrink (204.38.30.---)
Date: November 03, 2016 03:10PM

Here's a question for you.. am I right in thinking that because I'm trying to replace the .ibd and .frm files from a 5.6.12 installation into a 5.6.17 installation that WAMP is reading what's inside the files rather than just the file names?

I'm still not sure if you understand my question of why the swapping of identically named files in my database folder are not allowing WAMP to launch.

Your suggestions of using another 5.6.12 installation might be better. Do you have installer files of WAMP using 5.6.12? Your current download is higher than that.

I'm thinking that perhaps if I install a new 5.6.12 version, run a fresh WordPress install and then swap out the .ibd an .frm files with that version that it might work?

Options: ReplyQuote
Re: Reinstalled WAMP but not reconnecting to database files
Posted by: Otomatic (Moderator)
Date: November 03, 2016 04:13PM

Hi,

Quote
DavidBorrink
I'm still not sure if you understand my question of why the swapping of identically named files in my database folder are not allowing WAMP to launch.
Because the CONTENTS of these files are not compatible with files ib_buffer_pool, ib_logfile0, ib_logfile1, ibdata1 in the mysql5.6.17/data/ folder.
IT IS NOT A WAMPSERVER PROBLEM. IT IS A MYSQL COMPATIBILITY PROBLEM.

Files ".ibd, .frm " AND files "ib_buffer_pool, ib_logfile0, ib_logfile1, ibdata1" form an INDIVISIBLE whole. You can not copy only a part, it can not function.

> Your suggestions of using another 5.6.12 installation might be better.
> Do you have installer files of WAMP using 5.6.12? Your current download is higher than that.
See WAMPserver 3 - All you need to know

---------------------------------------------------------------
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons

Options: ReplyQuote
Re: Reinstalled WAMP but not reconnecting to database files
Posted by: DavidBorrink (204.38.30.---)
Date: November 03, 2016 06:26PM

Otomatic Wrote:
-------------------------------------------------------

> IT IS NOT A WAMPSERVER PROBLEM. IT IS A MYSQL
> COMPATIBILITY PROBLEM.
>
> Files ".ibd, .frm " AND
> files "ib_buffer_pool, ib_logfile0, ib_logfile1,
> ibdata1" form an
> INDIVISIBLE whole. You
> can not copy only a part, it can not function.
>

Thanks Otto, for clarifying that, because that's the answer I was originally wanting to know. I had a suspicion that it might be true because that's the only idea that made sense out of this.

So this is a MYSQL issue, that helps.

Great, so that answers that concern. I'll check out Wampserver 3.



Edited 1 time(s). Last edit at 11/03/2016 06:52PM by DavidBorrink.

Options: ReplyQuote
Re: Reinstalled WAMP but not reconnecting to database files
Posted by: Otomatic (Moderator)
Date: November 03, 2016 06:49PM

Hi,

> I'll check out Wampserver 3.
You will find in http://wampserver.aviatechno.net/ more addons for Wampserver 3 than on Sourceforge.

For example, the addons you need MySQL 5.6.12 32 bit x86 is not on Sourceforge.

---------------------------------------------------------------
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons

Options: ReplyQuote
Re: Reinstalled WAMP but not reconnecting to database files
Posted by: DavidBorrink (204.38.30.---)
Date: November 03, 2016 07:05PM

Super. Thank you for your helpful answers, Oto.

Options: ReplyQuote
Re: Reinstalled WAMP but not reconnecting to database files
Posted by: DavidBorrink (---.dhcp.aldl.mi.charter.com)
Date: November 29, 2016 02:50AM

I installed WAMP 3 and also put the MySQL 5.6.12 add-on in there. I got it up and running. I then installed WordPress and successfully established a new fresh site.

Then I went into my old database files and copied all the .frm, .ibd, and .opt files. I went back to the new installation and found that the new database contains .frm, .myi, and .myd files instead! Whoa. I was not expecting this, especially since I was trying to match the installations by using a 5.6.12 add-on.

What happened? How did I get .myi and .myd files in this installation? My method of replacing with the old .frm and .ibd files with the intent of running "alter table" command in PHPMyAdmin is not going to work if I can't replace the same files.

Options: ReplyQuote
Re: Reinstalled WAMP but not reconnecting to database files
Posted by: RiggsFolly (Moderator)
Date: November 30, 2016 10:37AM

Now we are getting to the crux of the matter.

If your old database folder \data\databasename contained only files with the extensions
.frm, .ibd, and .opt

Then this was a database with INNODB tables in it.

You cannot recover an INNODB database as simply as you can a MYISAM database

With INNODB database there is always some information about your database in the ibdate1 file located in the mysql\data folder.

Recovering an INNODB database from a copy of the \data\databasename\.frm, .ibd, and .opt file set a LOT MORE COMPLEX.

Maybe this will help [dba.stackexchange.com]

---------------------------------------------------------------------------------------------
(Windows 10 Pro 64bit) (Wampserver 3.3.4 64bit) Aestan Tray Menu 3.2.5.4
<Apache versions MULTIPE> <PHP versions MULTIPLE> <MySQL Versions MULTIPLE>
<MariaDB versions MULTIPLE> <phpMyAdmin versions MULTIPLE> <MySQL Workbench 8.0.23>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin
Get your Apache/MySQL/mariaDB/PHP ADDONs here from the WAMPServer alternate Repo
-X-X-X- Backup your databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-

Options: ReplyQuote
Re: Reinstalled WAMP but not reconnecting to database files
Posted by: DavidBorrink (---.dhcp.aldl.mi.charter.com)
Date: December 02, 2016 07:31PM

Thanks, Riggs. I have been spending a lot of time on dba.stackexchange.com to find ways to do this. That's where these ideas have come from in my interactions with others. It's been a real challenge.

I understand what you're saying, but my question was why did the new installation I made above create a MYISAM database when my original WAMP installation was a INNODB database?

My latest method was based on a situation I read using a XAAMP setup where they put copies of the old .frm, .ibd, and .opt files inside a fresh installed setup and then run a series of "ALTER TABLE" command in PHPMyAdmin. (Reference: [community.bitnami.com]) According to them, it worked. I wondered if I could do the same with WAMP.

So that's why my confusion came when I found a MYISAM setup instead of an INNODB setup in the new installation. My plan was thwarted. Is there a way to get the WAMP 3 setup with the MySQL 5.6.12 add-on to create a INNODB database instead?

Options: ReplyQuote
Pages: Previous123Next
Current Page: 2 of 3


Sorry, only registered users may post in this forum.