Last week I had a hard disk failure on my CentOS server. I managed to re-install CentOS on a new disk. I have the old mysql databases from /var/lib/mysql . Can I just move them to my new disk? Any help or suggestions gratefully received. -- Timothy Murphy e-mail: gayleard /at/ eircom.net School of Mathematics, Trinity College, Dublin 2, Ireland
MySQL is usually confined in /var/lib/mysql, so if you move the /etc/my.cnf and the /var/lib/mysql from the old server to the new one, you should be able to start the server normally, otherwise you should get some useful errors. A typical error in such case is MySQL files ownership/permissions. On Fri, Nov 15, 2013 at 2:18 PM, Timothy Murphy <gayleard at eircom.net> wrote:> Last week I had a hard disk failure on my CentOS server. > I managed to re-install CentOS on a new disk. > I have the old mysql databases from /var/lib/mysql . > Can I just move them to my new disk? > > Any help or suggestions gratefully received. > > -- > Timothy Murphy > e-mail: gayleard /at/ eircom.net > School of Mathematics, Trinity College, Dublin 2, Ireland > > > _______________________________________________ > CentOS mailing list > CentOS at centos.org > http://lists.centos.org/mailman/listinfo/centos >-- Marios Zindilis
On Fri, Nov 15, 2013 at 6:18 AM, Timothy Murphy <gayleard at eircom.net> wrote:> Last week I had a hard disk failure on my CentOS server. > I managed to re-install CentOS on a new disk. > I have the old mysql databases from /var/lib/mysql . > Can I just move them to my new disk? > > Any help or suggestions gratefully received.What you are 'supposed' to do is take the backup that you make regularly with 'mysqldump' and restore it with the mysql command line program. But if you are running on the same cpu type and mysql version, moving the disk or copying the directory contents will work (along with the things already mentioned about /etc/my.cnf and selinux). -- Les Mikesell lesmikesell at gmail.com
On Fri, Nov 15, 2013 at 10:01 AM, Reindl Harald <h.reindl at thelounge.net> wrote:> > abd what has the CPU type to do with the mysql datadir?Really??? You've never used processors with different bit/byte order than Intel's? I don't know specifically about Mysql but pretty much anything that stores binary representations to disk needs to be converted.> speaking with 10 years expierience and some hundret databases originally > created with MySQl 3.x on Windows, 4.x-5.0 running on MacOSX and since > MySQL 5.1 until now with 5.5 as well as MariaDB 5.5 running on Linux > without a single time payling around with dumpsSo no sparc's or the like in the picture? Not sure which way powerpc macs ran. -- Les Mikesell lesmikesell at gmail.com
On Fri, Nov 15, 2013 at 10:58 AM, Reindl Harald <h.reindl at thelounge.net> wrote:> >> I don't know specifically about Mysql but pretty much anything that stores binary >> representations to disk needs to be converted. > > with this logic you would need to convert MS office files > containing embedded images too....No, image formats have standardized binary representations so they are portable. The problem is with applications that write their own binary values and data structures to disk without conversion. I don't know much about msyql internals, but I wouldn't expect it to go to the trouble of normalizing things like index files just in case you wanted to move those disks to a sparc instead of doing a dump/load. -- Les Mikesell lesmikesell at gmail.com
On Fri, Nov 15, 2013 at 12:00 PM, Reindl Harald <h.reindl at thelounge.net> wrote:> > and why did you strip the part where i googled for you the endianess > of MacOSX on PPC because i clearly statet mysql-data dirs used here > in production went from MySQL 3.x on Windows i686 over MySQL 4.0-4.5 > on Apple OSX *Power PC* to MySQL 5.1/5.5 on Linux x86_64?Because that has nothing to do with the generic issue of moving binary data from one CPU type to another. If you got lucky and something happened to work for you once, great. It's not something people should count on - especially for programs that provide a tool for portability and consistency. -- Les Mikesell lesmikesell at gmail.com
On Fri, Nov 15, 2013 at 12:16 PM, Reindl Harald <h.reindl at thelounge.net> wrote:> > in other words you do not know anything about the mysql-internals > as you statet more than once, have no expierience and come up with > generic theory to defend your statementsYes, if you do things that work in general, you don't have to know all of the internals of every specific version of every specific program that you might ever touch. -- Les Mikesell lesmikesell at gmail.com
On Fri, Nov 15, 2013 at 12:32 PM, Reindl Harald <h.reindl at thelounge.net> wrote:> >> Yes, if you do things that work in general, you don't have to know all >> of the internals of every specific version of every specific program >> that you might ever touch. > > than better be quiet instead contradict and correct people with > generic wisdom which are on-topic and have the specific knowledge > and experience over many yearsFine, the next time I want to move MySQL 4.0-4.5 on Apple OSX *Power PC* to MySQL 5.1/5.5 on Linux x86_64, I'll ask your advice. -- Les Mikesell lesmikesell at gmail.com
Maybe Matching Threads
- Really changing the hostname
- broken mailing-list -> Re: Accentuated characters issue when receiving attributes from "samba user syncpasswords"
- Dovecot Oy merger with Open-Xchange AG
- Dovecot Oy merger with Open-Xchange AG
- Red Hat CEO: Go Ahead, Copy Our Software