Gentoo Archives: gentoo-user

From: kashani <kashani-list@××××××××.net>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] MySQL Upgrade
Date: Wed, 02 Nov 2005 19:25:02
Message-Id: 43691167.3080606@badapple.net
In Reply to: Re: [gentoo-user] MySQL Upgrade by "C. Beamer"
1 C. Beamer wrote:
2 > This works and is not a big deal. As I said, I'm just curious if there
3 > is a way to fix things so that my database will be backed up properly
4 > with the mysqldump process that is run when upgrading. As I also
5 > stated, I haven't had the chance to try dumping the existing database
6 > alone using mysqldump.
7
8 If the data is available within Mysql, then it can be dumped. I'd start
9 looking at which options you used on the dump and even at the dump
10 itself as the source of your problems. How you got the data into Mysql
11 in the first place should not matter. If you look at the dump itself I'd
12 pay special attention to the create lines. The usual mistake is not to
13 have specified the create statements which means everything gets created
14 as a table in a single database assuming you don't have any name space
15 collisions.
16
17 Normally I do the following for a new install.
18
19 on the old server or install
20 mysqldump -u root -p --opt -Q > mysql-20051102.txt
21 Not a super fancy dump, but if you're all text this should work fine.
22
23 on the new server or install
24 emerge mysql
25 /usr/bin/mysql_install_db
26 /etc/init.d/mysql start
27 /usr/bin/mysqladmin -u root password 'temppass'
28 mysql -u root -p
29 drop database test;
30 drop database mysql;
31 exit
32 mysql -u root -p < mysql-20051102.txt
33 mysql -u root -p
34 flush privileges;
35 exit
36
37 kashani
38 --
39 gentoo-user@g.o mailing list