No table shown in databases when copied user tables v1.8.1

Problems with the Windows version of XAMPP, questions, comments, and anything related.

No table shown in databases when copied user tables v1.8.1

Postby Gosain » 20. December 2012 05:11

Earleir I had XAMPP 1.7.x installed and working properly and whenever I had to migrate the mysql data for user created tables, I just had to copy respective database folder and it used to work fine. Later I installed v 1.8.1 on that system and copied user created table from mysql/data/folder of 1.7.x to 1.8.1 installation, some databases has few or all tables missing from them. I then re-created those missing tables and continued working.

Then after few days, I needed to migrate data from above XAMPP 1.8.1 installation from that old system to a new system having same XAMPP 1.8.1 version.

After installing XAMPP 1.8.1 on new system, I copied only user created tables from /xampp/mysql/data folder from old system to the new installation. When I opened phpMyAdmin, I saw those user created databases but I noticed that some databases have all or few tables missing from them. This was not supposed to happen as mysql data tables were copied from functional 1.8.1 to the same 1.8.1 version. Again, these missing tables were those which were created on old system using XAMPP 1.8.1 and all those tables were showing properly when created using XAMPP 1.7.x

Further digging revealed that when we were working on 1.7.x , all the tables created also had .MYD and .MYI files also along with .frm and copying mysql data folder for user created databases used to work just fine but since XAMPP 1.8.1 tables are created but no associated .MYD & .MYI are created - only .frm

When a table is created using phpMyAdmin in XAMPP 1.8.1, this also does not create any .MYD or .MYI files, just .frm

So what does this means? That,
- in XAMPP 1.8.1, only .frm file is created for the table and no .MYD or .MYI files are created ?
- copying user created databases (.frm) between two different 1.8.1 versions will not work at all ?

Please help me on the above to show up user created tables in database in 1.8.1 copied from another 1.8.1 installation.

Thanks.
Gosain
 
Posts: 2
Joined: 20. December 2012 03:13
Operating System: Windows 8

Re: No table shown in databases when copied user tables v1.8

Postby Gosain » 20. December 2012 06:09

I googled and found this:
http://forums.mysql.com/read.php?11,565093,565176#msg-565176

I just discovered:
copying data files is NOT a reliable way to backup a database.

The "best" way is use mysqldump. Then we get everything.


I needed ibdata files as well. This resides in xampp/myql/data folder.

Steps:
* Stop the MySQL server, remove any existing ibdata and ib_logfile files.
* Place old ibdata files only. Don't place ib_logfile files.
* Start the server.
* It will create new ib_logfile(s) as required.

After doing the above, all tables were visible in respective databases.

As to me, I Hope above will be of help to others too.

Thanks.
Gosain
 
Posts: 2
Joined: 20. December 2012 03:13
Operating System: Windows 8


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 129 guests