How to restore mysql database in XAMPP - mysql

I have been using XAMPP on Ubuntu for a while and I had created a DB via phpMyAdmin with a single DB and multiple rows.
After having to restart my PC, I could not restart XAMPP, so I did install it again (ran the installed.sh without installing first)
Installation was successful and web server is working fine with old files retained.
But, I find that I cannot access the table any more, even though I see it listed via phpMyAdmin and gives an error "Table does not exists in the engine".
However, I can see the table.ipd, table.frm and db.opt inside /opt/lampp/var/mysql/
Is there a way to restore the table from the XAMPP stack?

Related

mysql workbench dropped table

my MySQL workbench setup with a database on it. I was using xampp with it but xampp stopped working so I uninstalled and reinstalled it. could this be the issue as to why the table went missing?
workbench is only a Gui, it will not drop anything without any user input.
MySQL server and xammp would work parallel when you choose a different port for one of them.
Your problem is that both save theier files in diffrent path(default)
MYSQL saves its data in
C:\ProgramData\MySQL\MySQL Server 8.0\Data
While xammp stores their database in
C:/xampp/mysql/data
in Restoring MySQL database from physical files you find a tutprial how to restore your tables from the files from your old installation

Restore the mySQL database from files - Windows server

I have tried everything I can find now for over 3 days straight to recover a mySQL database on Windows.
What happened?
I have a Windows Server 2012 that crashed which had WordPress on it and the MySQL 5.1 database for WordPress with no backups. Is there no way to recover from this with a database backup even if you have all the files?
What I have tried!
Attempt 1 recovery (try to add the database from the crashed server to the current mySQL instance):
I reinstalled a new MySQL 5.1 on to the new Windows Server 2012
system and I moved just the /data/wordpress953 folder over
“completely” from the crashed system (which was working fine) into
the /data folder of the new MySQL install.
I start up MySQL and login just fine. I see my database. I see all the tables. However, if I go to a table to view it and I get the following error.
1146 = Table ‘Wordpress953.wp_commentmeta’ doesn’t exist
Attempt 2 recovery (try to completely replace the current mySQL instance files from the crashed server on top and overwrite the new instance):
I completely move over the /data folder from the old server replacing it on the new server
I completely move over the /program files/mysql folder over from the old server onto the new server
I completely move over the /program files (x86)/mysql folder over from the old server
I startup mysql and go to phpmyadmin and get the following error when I try and login:
1045 Cannot log in to the MySQL server
I figure I just need to fix the root password so I attempt to change the root password using this process https://www.youtube.com/watch?v=dyc5b3yT2tI but it fails to even start mySQL to change the password.
Please help with an answer of something I haven't tried....
Ok, I got it!!
The procedure is.
Install vanilla mySQL on new server (I had already done that)
Stop mySQL service
Move ONLY the C:\Program Data\data\wordpress953 (the innodb database you want to restore) folder over “intact” “as is”.
And, move ONLY the ibdata1 file and ib_logfiles off of the original C:\Program Data\data\ root to the new mySQL server. Leave the C:\Program Data\data\mysql folder “as is” from the vanilla install
Re-Start mySQL service
It was a bit of a puzzle because it was basically an “incarnation” of what I was doing but you have to only change/do certain things. The C:\Program Data\data\ibdata1 file down one level in the root went with the C:\Program Data\wordpress953 folder but apparently not with \mysql.

LAMPP Error #1932 after update: Tables don't exist

I recently updated my Ubuntu server, and now all the tables in my database are telling me they don't exist.
I had some issues with phpMyAdmin after restarting the machine, so I reinstalled it and eventually got it working again. I can see the database and it lists all of the tables, but as soon as I click on any it says "Table xxx.xxxx doesn't exist in engine". I can see the files are still there in nautilus.
I have done a lot of research and I see some general information about rebuilding the tables, but I don't usually do anything in a LAMPP environment and I can't lose any of this data, so I've been wary about running some of the commands (especially the ones that include DROP).
I am running XAMPP for Linux 5.6.23 and phpMyAdmin 4.5.2 on ubuntu 16.04
I did end up solving this eventually. I used https://recovery.twindb.com/ to recover the frm files and rebuilt the database tables one at a time using the MySQL CLI. I removed and reinstalled XAMPP and phpMyAdmin and finally got it all working after dumping and then importing.

After WAMP update & migrate, mysql tables have no structure / primary keys

We've moved WAMP to another drive on our server - the old version was WAMP 2.4, and the new one is WAMP 2.5. We installed 2.5 fresh on the new drive, and copied the www and mysql data folders from the old install.
It's 'working' - sites appear to run fine - but I've discovered that the database structure appears to be gone. All database tables have no primary keys, and no visible structure in phpMyAdmin.
This is the case for databases brought into the new WAMP install in the mysql data folder as well as new databases: I can export a database with structure from a remote server, but after importing to the local WAMP server the structure is stripped.
Two questions:
(How) can the database structure be restored?
How can I create or import new databases with structure?
Curiously this sorted itself out after attempting to troubleshoot the issue then undoing changes. What we tried:
Restarted all WAMP services, exited and reopened WAMP - unsuccessful.
Copied entire old mysql folder to new WAMP install, attempted to run mysql service with old mysql version - unsuccessful.
Reverted to newer version of mysql that came with WAMP 2.5 (back to initial state before troubleshooting), restarted services - unsuccessful.
Waited 10 minutes - table structure returned, working correctly.
This leads me to believe there was an interaction with another process or condition on the server, rather than a misconfiguration of WAMP.

Not able to start new server instance in MySQL workbench6.0.7

I just installed MYSQL workbench 6.0.7 but i m not able to get the server up. It shows the
Error - The database server instance is unknown
And start server button is disabled.
Please Help
Actually this was the second time i was trying to install MySQL(first time it had crashed).
while uninstalling the first time, it didnt remove some of the data folders.
I had to delete MySQL Data folder from C:\Documents and Settings\All Users (manually)
and reinstalled MYSQL workbench and the instance.
It is working absolutely fine now...