Pages: Previous123
Current Page: 3 of 3
Re: Reinstalled WAMP but not reconnecting to database files
Posted by: Otomatic (Moderator)
Date: December 02, 2016 08:13PM

Hi,

A database table can use different engines like MyISAM or InnoDB. To create an InnoDB table, specify that the engine must be InnoDB as below:
example:
DROP TABLE IF EXISTS `test_inno`;
CREATE TABLE IF NOT EXISTS `test_inno` (
  `test_id` int(11) NOT NULL,
  `test_name` varchar(15) NOT NULL,
  `test_value` varchar(20) NOT NULL,
  PRIMARY KEY (`test_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
If you do not specify a motor, it will be the default engine that will be used, and the default engine for all MySQL versions of Wampserver is MyISAM.
This is done to avoid problems for beginners, the InnoDB engine being more complex to use than the MyISAM engine.
However, this does not preclude, although the default engine is MyISAM, to create InnoDB tables, just specify it. It is possible to have MyISAM and InnoDB tables cohabit within the same database.

If an installation is found with MyISAM tables, it means that it does not need InnoDB tables, otherwise the engine would have been specified. As I wrote above, you should only use InnoDB tables if you really need them. I think that with this long thread, you understand why.

---------------------------------------------------------------
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: December 08, 2016 01:58AM

I see. Then my INNODB tables are hopeless? You say that "the default engine for all MySQL versions of Wampserver is MyISAM." Then how did WAMP create an INNODB table for my original installation?

If I was to convert the table wp_users, would I be able to run that set of commands you listed in the last comment? Could I replace 'test_inno' with any table name? And would I need to replace the 'test_id', 'test_name', and 'test_value' with anything?

Options: ReplyQuote
Re: Reinstalled WAMP but not reconnecting to database files
Posted by: Otomatic (Moderator)
Date: December 08, 2016 09:18AM

Hi,

> Then how did WAMP create an INNODB table for my original installation?
IT'S NOT WAMPSERVER THAT CREATES TABLES!

As I have already explained, the tables are created by the web application you are installing.

So if the table creation query sent by the installer does not give an "ENGINE = InnoDB" directive, the table will be created with the default engine.

I think I have spent a lot of time and energy explaining to you what InnoDB tables are as well as RiggsFolly which gave you links on recovery procedures.
Now it's up to you to play and do the testing.

The links to the official MySQL documentation are in my signature and in that of RiggsFolly.

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



Edited 2 time(s). Last edit at 12/08/2016 05:45PM by Otomatic.

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

Otomatic,

Thank you for all the time you've spent in explaining things to me. I'm not a database expert, so trying to learn why things work is helpful.

If I've come across as misunderstanding anything, I'm sorry. Judging by your use of red all caps, I must be annoying you. I'm just desperately trying to solve this. I didn't realize that WordPress created the database structure, not WAMP. So obviously my very old WordPress installation created the INNODB tables a long time ago, but now they must create MyISAMs. So that would appear to be the final word. I'm stuck with unconnectable ibd files.

I'm going to have to resort to opening my wp_post tables in TextWrangler and convert them to regular text files in order to claim my content back. That appears to be my only solution left.

dba.stackexchange people have tried and it just looks impossible.

It appears to me that I'm just the unfortunate situation that wound up with frm and ibd files after uninstalling WAMP by mistake last spring.

Thanks again for your time.

Options: ReplyQuote
Re: Reinstalled WAMP but not reconnecting to database files
Posted by: RiggsFolly (Moderator)
Date: December 09, 2016 11:00PM

You said

So obviously my very old WordPress installation created the INNODB tables a long time ago, but now they must create MyISAMs

NO no no they are what they are, they dont HAVE to be MYISAM or INNODB. They are what they are.

But as they were created as INNODB then the recovery from a Woops is always more complicated if you didnt take a regular backup.
It was the Uninstall that surprisingly enough screwed everything up for you as that deleted the ibdata1 file that contains in some cases almost all of the actual data. Without the data recovering the data is kinda difficult. If you had done the same thing on your MAC you would be in the same situation.

I'm going to have to resort to opening my wp_post tables in TextWrangler

If the main body of the actual data was in the ibdata1 file, which you deleted, the files you still have will contain very little, if any, of the actual data. But I wish you luck

---------------------------------------------------------------------------------------------
(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: RiggsFolly (Moderator)
Date: December 10, 2016 11:44AM

David,


Did you find this [www.chriscalender.com] it just might help

And this [dba.stackexchange.com]

I stumbled on them this morning, hope they are of use

---------------------------------------------------------------------------------------------
(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-



Edited 1 time(s). Last edit at 12/10/2016 11:45AM by RiggsFolly.

Options: ReplyQuote
Re: Reinstalled WAMP but not reconnecting to database files
Posted by: DavidBorrink (---.dhcp.aldl.mi.charter.com)
Date: December 11, 2016 05:09AM

HEY, I got it working!!!!

So funny because suddenly I got a notice with three answer updates on dba.stackxchange. Three of my questions from accross the summer and fall were finally answered. It allowed me to connect a few dots in the puzzle, and suddenly after reexamining my notes, I saw a path of understanding.

I'm going to write a post on my web site about this to explain how it works now that I finally figured it out. The lights came on this evening.

Short version: by sending my .frm files to a site that converted them to readable text files (https://recovery.twindb.com/), I was able to use the "CREATE TABLE" statements in them to recreate the table structure on a new database file, then run an "ALTER TABLE" set of routines to remove the newly created .ibd files after they had populated the new ibdata1 file. Then I put the old .ibd files inside the new database folder and run some more "ALTER TABLE" commands to "connect" to the actual data. That brought my database back to life again.

Sources for the routine's details:
[dba.stackexchange.com]
and
[dba.stackexchange.com]

Riggs. I note that YOU were one of the people who answered one of my questions. I deeply appreciate the gesture.

Options: ReplyQuote
Pages: Previous123
Current Page: 3 of 3


Sorry, only registered users may post in this forum.