Mailing List Archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [tlug] Empty databases after moving MySQL data files [SOLVED] + new question




Thank you all for responding.

Mattia turned out to be right there was something kind of borked in the
MySQL install. I reinstalled all the MySQL packages using Synaptic, and
I got an error saying something about returning exit code one and some
other gobbledygook. However, a quick search on Google advised to not
rely on the package manager to properly shut things down, and instead
shut down the MySQL server manually before the reinstall. After killing
a few processes, the reinstall worked, and I seemed to have a more
stable MySQL environment.

However, I heeded Stephen's warning that mucking about with the users
and groups might bring me more trouble than it solves, so I abandoned
that approach.

In the end, what I did was simply import the tables into the databases
from some recent manual backups, and that got things going again. Having
done that once, the databases and tables all seem to stick together now.
I'm guessing something got a little muddled when I moved the location of
the datafiles, and refilling the databases with their tables set it
straight.

So the issue is resolved, at least in terms of letting me move forward
with my work.

However, I do have a question about MySQL data files.

Are the data files specific to one server or computer in any way?

To put it another way, can I take everything out of the /var/lib/mysql
directory from one machine, and put it on another, and have all my
databases and tables working, at least in theory?

I ask because part of what I'm doing is to synch my home directory with
Dropbox, in order to have an extra layer of off-site backup.

So let's say all of Japan is obliterated in a nuclear apocalypse, and
somehow I escape, although all my computers have been reduced to day-glo
ashes. I make it to the now warm and tropical Anarctica and buy a new
laptop from a local mutant run computer shop. Fortunately for me,
Dropbox.com was prepared for the impending global armageddon and had
backup servers in an underground bunker on Svalbard Island.

After all that, can I take the data files that I've mirrored on Dropbox
and put those files on my new computer's /var/lib/mysql directory and go
ahead like nothing ever happened?

Or is there something in "libdata1", for example, that would confound
that effort?

-- 
Dave M G


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links