Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recovery from files

Status
Not open for further replies.

scienzia

Programmer
Feb 21, 2002
160
IT
Hi,

I had a mysql server installed on a debian pc. Now the pc OS is corrupted and doesn't start correctly any more. I am still able to recover the files from the pc, but if I put the files on another mysql server it hangs.

I would like to know the procedure to transfer the db to another pc correctly. Right now I don't know if the transfer doesn't work because the files are corrupted or the procedure is wrong.

This is the output of "ls -l" and "du -sch" in /var/lib/mysql:

Code:
total 1241123
drwx------  2 sshd usb         184 Oct  4  2006 UPC
drwx------  2 sshd usb         464 Mar 23 09:02 bru
-rw-rw----  1 sshd usb       25088 Sep  8  2006 ib_arch_log_0000000000
-rw-rw----  1 sshd usb     5242880 Jun 20 06:52 ib_logfile0
-rw-rw----  1 sshd usb     5242880 Jun 20 06:51 ib_logfile1
-rw-rw----  1 sshd usb  1260388352 Jun 20 06:52 ibdata1
drwxr-xr-x  2 sshd root        624 Sep  8  2006 mysql
drwx------  2 sshd usb         464 Oct  4  2006 temp
drwxr-xr-x  2 sshd root         48 Sep  8  2006 test
drwx------  2 sshd usb         464 Sep  8  2006 upc
drwx------  2 sshd usb         464 Jan  2 12:14 upc_300
drwx------  2 sshd usb         464 Jun  7 12:47 upc_400B
drwx------  2 sshd usb         464 Jun  7 11:12 upc_400C
drwx------  2 sshd usb         464 May 14 05:48 upc_8146
drwx------  2 sshd usb         464 May 14 11:49 upc_8888
drwx------  2 sshd usb         464 Jan 24 06:05 upc_marzo_06
drwx------  2 sshd usb         464 Oct  4  2006 upc_new


49K	UPC
145K	bru
28K	ib_arch_log_0000000000
5.0M	ib_logfile0
5.0M	ib_logfile1
1.2G	ibdata1
121K	mysql
145K	temp
512	test
145K	upc
145K	upc_300
145K	upc_400B
145K	upc_400C
145K	upc_8146
145K	upc_8888
145K	upc_marzo_06
145K	upc_new
1.2G	total

ibdata1 is more than 1 GB, and the folders of the DBs are very small.
Is ibdata1 containing the data of all databases, or I just lost everything?

Thanks in advance.
 
I don't think I've seen it hang. Do you mean when MySQL starts?

Who are "sshd" and "usb"? Are you sure the file permissions are correct?
 
The strange owners are due to the fact that I mounted the partition using knoppix, so the user ID mapping is different.

I managed to see almost all the DBs by installing on windows the version 4 of mysql, I just missed 2 DBs, which where exactly the ones I needed...

You can't imagine how I solved the problem: I opened the ibdata1 file with a viewer, and scrolled untill I found the data I needed, which was in plain text.
I didn't that the data was stored not encrypted and not compressed in the file, I feel very lucky.

Thanks for interesting in my problem.



 
from knoppix

chown -R mysql:mysq; /var/lib/mysql

restart mysql.

______________________________________________________________________
There's no present like the time, they say. - Henry's Cat.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top