I re-installed wampserver 2.5 (with same stuff/settings - nothing changed) and after installation my database got corrupted. Few database tables exist and many of them are not accessible. On right frame it shows No tables found in database.
Even the sidebar of phpmyadmin shows my database table
but when I try to open any table it says:
To confirm whether tables exists in database, I go to
C:\wamp\bin\mysql\mysql5.6.17\data\db_blog
where I can see a long list of stuff. My tables are listed in 2 different formats frm and idb.
How can I repair my database? Please help me.
Before reinstalling wamp you should have done backup of database and after reinstall bring database back from backup. If after reinstall of wamp database is still available but seems to be corrupted then there you did something wrong with wamp reinstall as database should be purged or not touched, nothing in between. Now everything depends on what you want to achieve: you can purge databases simply using phpmyadmin or try to somehow restore database but it is possible only if you have backup of database, otherwise data is corrupted and can't be restored. You may try to repair database by following this article but do not expect miracles:
https://www.a2hosting.com/kb/cpanel/cpanel-database-features/optimizing-and-repairing-mysql-databases-with-phpmyadmin
Related
I have a MySQL 5.5 database in a web hosting, which I access using PHPMyAdmin (the hosting provider doesn't give me shell access). I back the database up using the "Export" function in PHPMyAdmin.
Recently, however, whenever I try to run the backup, I get an interrupted DB dump, and I see in it a PHPMyAdmin backtrace saying that "MySQL: the server has gone away". The two solutions to this, as I understand it, are:
Changing the "max_allowed_packet" parameter in the server... but I can't do that.
Repair tables... but I checked the status of the tables in the DB, including the ones where the dump usually stops, and they all seem OK.
I can always back it up in chunks, but it's a hassle to do that when the DB has about 40 tables. What can I do to fix this?
Prior to the formatting of my PC, i backed up the entire database set through phpmyadmin.
Now when i am restoring my exported sql file, its showing me an error "#1046 No Database selected".
Going through many question answers, i got to know that i should have exported the databases one by one. But now the mistake has already happened, and i have no other alternative to backup the database again, i am left with the already backed up file of "Entire Databases of server".
How to recover them now?
I'm having a very weird problem right now, I reinstalled Wamp server (same version, same folder, everything is the same). But after I reinstalled it, my database got damaged. It shows that I don't have tables in my database even though the tables still show when I open my database on the left sidebar. Trying to exporting and importing the database only creates an empty database. I sadly didn't create a backup because I reinstalled wamp multiple times before without it damaging any fields or databases.
Here's a screenshot (My database's name is asd) :
http://i.imgur.com/5PKKXgK.png
Is there any way to repair this database ?
The last time I had that, I had to change ownership. This is how I did it in Linux.
chown -R mysql:mysql /var/lib/mysql/
In windows you can right-click the mysql database folder, in you case
C:\wamp\bin\mysql\mysql5.6.17\data\asd
And then go to Security Make sure all permissions are OK.
Then you can go to Advanced > Owner and make sure ownership,
I just had this problem, and all I had to do was restart the database.
Yesterday I updated osx to 10.1.2, today I was working on a project and the mysql server was not running, after several times to try to start the served I tried to reinstall xampp. Now the mysql server is working but my databases on phpmyadmin looks broken. This is how it looks
I can see the database name, on the left I can see the tables but when I click on a table it says that doesn't exists (and you can see the text "No tables found in database").
In Xampp/xamppfiles/var/mysql there are folders with the name of my databases, and inside each folder, there are files with the name of the tables (all the tables, also the table author in the picture) with extensions .frm and .ibd.
If I open my terminal and run show databases; from the mysqli cli, it shows only two databases: information_schema and test, looks like there are no databases here....or I am doing the wrong thing...
Is it possible to restore databases and tables?
I've got a database (all MyISAM tables) and the machine where MySQL was running is no longer bootable. However, we have all the MySQL data files from the data directory. How can I restore the data from the MYD and FRM files, or whatever other files I should be looking at in the data directory?
I've been doing some searching on this and it sounds like for MyISAM I should just be able to copy the database subdirectory from the old MySQL data directory to the new MySQL data directory. However, that's not working for me. A database with the name of the database I'm trying to recover shows up in the list of databases in phpMyAdmin, but all the tables show "in use" and have no information (e.g., number of rows, number of bytes, column information, etc.). Any operation on those tables (e.g., SELECT * FROM {table}, REPAIR {table}, CHECK {table}) returns a "no such table" error.
One of the tools I ran across in my search is DBACentral by MicroOLAP. It's got component that's supposed to restore data from FRM/MYD files, but when I tried to run it, it didn't list any tables that it could recover from my FRM/MYD files.
This is on a developer workstation that's running Vista Business 32bit. MySQL version is 5.0.27. After fixing the machine, I went and got the exact same version of MySQL (v5.0.27), thinking that if I'm just going to drop in the binary data files I should do it with the same version of MySQL. It still didn't work.
Any insights would be greatly appreciated... thanks!
-Josh
Install the same version of mysql.
Remove mysql directory from data directory of the server and copy it from the crashed server. This is the key element
copy directory of database you want to recover into data directory of new server
start mysql.
switch to mysql database: USE mysql; and run REPAIR TABLE <table name> on every table.
Do the same with database you want to recover
tip: make sure the 2 directories have the same permissions like data directory
If you did not save mysql database (mysql directory in your old server's data dir, then you can try to:
create database with the same name as database you want to recover.
Then you can create each table (it would be good to use the same structure - you'd have bigger chance of recovery).
then stop mysql server and delete files from database directory and overwrite them with files from old server
start mysql and repair each table.
I wound up giving up. I think the answer is that, with my particular version of MySQL, this doesn't work. Hopefully things have improved since then.