1
dean_collins
mysql

where in the debian hard drive folders is the MySQL database saved?

I've had a problem with one of my ahrd drives this morning and although I can access the original hard drive files I need to know where/what to copy across to the new hard drive?

tia,
Dean

2
dean_collins
Re: mysql

If anyone wants to help on the bigger problem you are welcome to. Heres the story of my day.

I woke up this morning and found my webserver non resposive upon rebooting I was told grub had error 25 (disk problem)

I have installed debian, apache and MySQL on a second hard drive in the same machine (it was a physical identical with nothing on it)

I have mounted the orignal (faulty supposedly) drive as /mnt/copyall folder on the second drive.

The original master files are still there.

What is the best way for me to solve my problem? How do i get up and running?


Do I

Is it copy over MySQL apache etc and other files I need and copy these to the secondary drive?

Is it repair the original drive? (still dont know what in grub was causing this)

Crash everything and start again?

I currently am copying off the original files to another machine via winscp and hopefully some people here will be able to advise me of best course to take.


TIA,
Dean

3
Dave_L
Re: mysql
  • 2005/9/6 22:17

  • Dave_L

  • XOOPS is my life!

  • Posts: 2277

  • Since: 2003/11/7


Quote:

dean_collins wrote:
where in the debian hard drive folders is the MySQL database saved?


The normal location for linux is /var/lib/mysql. There should be one subdirectory for each database. Within each of those subdirectories, there should be three files for each table.

In my case it's different, since I use XAMPP, and the path is /opt/lampp/var/mysql.

If possible, run phpMyAdmin and in the MySQL section of the output, the variable MYSQL_SOCKET contains the path. Or run MySQL from the command line; then run the "status" command, and look at the value given for "UNIX socket".

Or you could search for it with the shell command: find / -name mysql.sock

4
dean_collins
Re: mysql

of so I found the /var/lib/mysql file

is there anythign else I should be copying across apart from that?

if I copy the MySQL file, and /apache/(all of the XOOPS files)across is this it? I will have my original site or is there more to it?

also when I copy across the XOOPS files does this mean all the permissions etxc will come across as well?

Cheers,
Dean
p.s. I'm starting a bounty for automated bas=cup script now

somethign that runs every x hours and copies across to a second machine) $50 is my start

5
dean_collins
Re: mysql

ok it didn't work, got about half way through when


General failure.
Error code: 4
Error message from server: Failure (*)
Request code: 5

came up

6
dean_collins
Re: mysql

are these not copying across because of permissions?

if I change all of the permissions will it work or are permissions so granular that I would never eb able to change them back properly?

7
Dave_L
Re: mysql
  • 2005/9/6 22:53

  • Dave_L

  • XOOPS is my life!

  • Posts: 2277

  • Since: 2003/11/7


You should copy the files as root.

I would use "cp -a source_dir/* dest_dir".

You should only copy the subdirectories containing the databases that you want to transfer.

8
dean_collins
Re: mysql

I'm actually trying to copy them off to a windows machine because I'm more comfortable with windows (stupid command line linux) :P

but if I can copy it acorss to my second linux hard drive and thats a good idea then can you give me more info.

9
dean_collins
Re: mysql

cognationweb1:~# cp -a /mnt/copyall/var/lib/mysql/aussienymeetup/* /var/lib/mysql/aussienymeetup
^[[3~cp: reading `/mnt/copyall/var/lib/mysql/aussienymeetup/xoops_banner.MYI': Input/output error
cp: reading `/mnt/copyall/var/lib/mysql/aussienymeetup/xoops_bb_topics.MYI': Input/output error
cp: reading `/mnt/copyall/var/lib/mysql/aussienymeetup/xoops_session.MYI': Input/output error
cp: reading `/mnt/copyall/var/lib/mysql/aussienymeetup/xoops_stats_date.MYI': Input/output error
cp: reading `/mnt/copyall/var/lib/mysql/aussienymeetup/xoops_stats_month.MYI': Input/output error
cp: reading `/mnt/copyall/var/lib/mysql/aussienymeetup/xoops_stats_year.MYI': Input/output error
cp: reading `/mnt/copyall/var/lib/mysql/aussienymeetup/xoops_user_profile.MYI': Input/output error



came back with the errors above (but wow thats fast for the rest of the file - love that linux :)

10
dean_collins
Re: mysql

Argh whats worse than no website :)

Half a website

http://www.aussienymeetup.net

this is what happened when I copied across

mysql db files: /var/lib/mysql
apache file: /var/www

cp -a src dst



cp: reading `/mnt/copyall/var/lib/mysql/aussienymeetup/xoops_banner.MYI': Input/output error
cp: reading `/mnt/copyall/var/lib/mysql/aussienymeetup/xoops_session.MYI': Input/output error
cp: reading `/mnt/copyall/var/lib/mysql/aussienymeetup/xoops_user_profile.MYI': Input/output error
cp: reading `/mnt/copyall/var/lib/mysql/aussienymeetup/xoops_bb_topics.MYI': Input/output error
cp: reading `/mnt/copyall/var/lib/mysql/aussienymeetup/xoops_stats_date.MYI': Input/output error
cp: reading `/mnt/copyall/var/lib/mysql/aussienymeetup/xoops_stats_month.MYI': Input/output error
cp: reading `/mnt/copyall/var/lib/mysql/aussienymeetup/xoops_stats_year.MYI': Input/output error


I cant log in now, and although the photos are there the forums aren't working and obviously I cant log in as webmaster to change any permissions.

Also the forums aren't working at all.

any thoughts or should i just copy and past and salvage what i can and start again?

Cheers,
Dean

Login

Who's Online

273 user(s) are online (59 user(s) are browsing Support Forums)


Members: 0


Guests: 273


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Sep 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits