OSX 10.1.2 XAMPP database errors after upgrade - mysql

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?

Related

phpmyadmin shows tables in the sidebar but tables don't exist

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

Phpmyadmin shows "No tables found in database." but tables still exist on the left sidebar?

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.

MySQL 5.6.14 cannot detect data created from MySQL 5.6.11

I have a created a database called "global" in MySQL 5.6.11.
The data files are stored in a separate folder from MySQL installation directory. Hence the database "global" can be clearly located in folder "global" in Windows Explorer.
What I did was, copy that entire folder to another directory for backup purposes.
Due to a bug in mysqldump.exe (5.5.16) which state that it has older version that the MySQL server (5.6.11), so I decided uninstall everything and remove every data (not the backup).
Then I install MySQL 5.6.14. And I copied back the "global" folder from backup to the root data directory of the new MySQL installation. When I open MySQL Workbench, it can detect the database. I even expand the "tables" node and able to see the list of tables in it.
Surprisingly, when I tried to query the data, MySQL showed an error those tables do not exist. Every single table does not exist everytime I query it by using simple syntax: select * from account. I even used the command line, but it still doesn't work.
Does someone know why?

I Reinstall XAMPP but I can't create DB with same name

I have uninstalled XAMPP
I installed it again
First I had a DB named 'xyz'. After I reinstalled XAMPP, the DB is normally deleted but here the problem started...
When I try to create a database with same named 'xyz', I can create it, but if I try to create for example 'cities' table in 'xyz' DB, MySQL gives an error and it blocks me. Because I had the cities table before I uninstalled XAMPP.
If the DB is not deleted, where is it? If it is deleted, why can't I create the cities table?
Please, help me.
While Uninstalling XAMPP or any other virtual web server on a windows machine, there remains a folder which includes databases and other files like logs and etc.
After Uninstalling go to where you installed (in my case c:wamp ) and delete any remaining files if you dont need them, if you need the databases, do not delete them.
maybe you can go mysql command line, use show databases; to see databases, and show tables to tables
DB may not be deleted correctly.
Please use Drop database dbname and see if that helps

How can I recover MySQL tables from data files?

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.