From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from lists.gentoo.org ([140.105.134.102] helo=robin.gentoo.org) by nuthatch.gentoo.org with esmtp (Exim 4.50) id 1ETJQK-0001dO-1i for garchives@archives.gentoo.org; Sat, 22 Oct 2005 13:28:36 +0000 Received: from robin.gentoo.org (localhost [127.0.0.1]) by robin.gentoo.org (8.13.5/8.13.5) with SMTP id j9MDNeJv022687; Sat, 22 Oct 2005 13:23:40 GMT Received: from xproxy.gmail.com (xproxy.gmail.com [66.249.82.207]) by robin.gentoo.org (8.13.5/8.13.5) with ESMTP id j9MDNdpu026662 for ; Sat, 22 Oct 2005 13:23:40 GMT Received: by xproxy.gmail.com with SMTP id h29so224451wxd for ; Sat, 22 Oct 2005 06:26:34 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=EsI533QPH80wMpRJTFGKgYKI2E3Or/MbWIBctU6n97/46rhoMalrfHh+/xkxzd1VSpfdCNvXx04F3dO3ZIb2sISEf0Ml4XHO/vn5QKg36NBdSpbfo4+Q9T/abkCMszpTAjNaZRut87E5MXx/2Em9NeASinj7+CwIrlriuEhiwU4= Received: by 10.70.53.10 with SMTP id b10mr2423696wxa; Sat, 22 Oct 2005 06:26:34 -0700 (PDT) Received: by 10.70.110.16 with HTTP; Sat, 22 Oct 2005 06:26:34 -0700 (PDT) Message-ID: Date: Sat, 22 Oct 2005 09:26:34 -0400 From: Barry Marler To: gentoo-server@lists.gentoo.org Subject: Re: [gentoo-server] mysql-4.1 In-Reply-To: Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-server@gentoo.org Reply-to: gentoo-server@lists.gentoo.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Disposition: inline References: <4357203B.2060500@munat.com> <43588B41.6040009@munat.com> <200510211207.26060.vivo@gentoo.org> <4358EB92.2010605@gentoo.org> Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by robin.gentoo.org id j9MDNdpu026662 X-Archives-Salt: 7326d526-03eb-46a8-ae61-31a034e8c7eb X-Archives-Hash: 0bb882172f498282ee03ab09cd7d59d3 On 10/22/05, Dave Strydom wrote: > oh yeah, and change the --password='' field to your own password, dont just > copy past. > > Dave > > > On 10/22/05, Dave Strydom wrote: > > Man, this ...... page messed up my mysql stuff seriously, ok, for those > who had the same libmysqlclient.so.12 problems i had or for those people who > get to the importing of all your database backup and it stuffs up. here is > DAVE'S guide to upgrading to MySQL 4.1 > > > > > > # = commands to type > > = = comments > > > > ==================================== > > # mkdir -p /home/backup/mysql > > # nano mysql_backup.php > > > > == > > = Place the code below into the mysql_backup.php and save the file = > > == > > > > /*------mysql_backup.php---------*/ > > > print("mysql backup\n"); > > foreach (glob('/var/lib/mysql/*') as $fullname) > > { > > $database = basename($fullname); > > $command = sprintf('mysqldump -a -B %s -c -v -Q > > /home/backup/mysql/%s.sql --password=\'Our@db$IG\'', $database, $database); > > > > exec($command); > > print($database . ' : ' . $command . "\n\n\n"); > > > > } > > ?> > > > > > > /*-----------------------------------------------------*/ > > > > # nano mysql_restore.php > > > > == > > = Place the code below in the mysql_restore.php and save the file = > > == > > > > /*------mysql_retore.php---------*/ > > > > > print("mysql backup\n"); > > > > $dir = '/home/backup/mysql/'; > > if ($fp = opendir($dir)) > > { > > print('running...'); > > while (($file = readdir($fp)) !== FALSE) { > > echo "$file\n"; > > > > $database = basename($file); > > $command = sprintf('mysql < /home/backup/mysql/%s > --password=\'Our@db$IG\'', $database); > > print($database . ' : ' . $command . "\n\n\n"); > > exec($command); > > > > } > > closedir($fp); > > } > > else > > { > > print('cannot open path ' . $dir); > > } > > > > ?> > > > > /*---------------*/ > > > > # php mysql_backup.php > > > > == > > = This will make individual backup's of all your databases, the reason i > make it create scripts for each database > > = instead of just pumping it all into 1 database, is because if there is a > problem on like 486590 of a 5 million > > = line file, its going to be a bitch to work with, this way it just > simplifies matters > > == > > > > # quickpkg dev-db/mysql > > # /etc/init.d/mysql stop > > # emerge -C mysql > > # rm -rf /var/lib/mysql/ /var/log/mysql > > # emerge mysql > > # etc-update > > # emerge --config =mysql-4.1.14 > > # revdep-rebuild --soname libmysqlclient.so.12 > > # php mysql_restore.php > > # mysql_fix_privilege_tables > --defaults-file=/etc/mysql/my.cnf --user=root > --password='PASSWORD' > > # /etc/init.d/mysql restart > > > > And thats it. > > ======================================= > > > > Dave > > > > The upgrade TOTALLY pfutzed my test box. After installing 4.1, revdep-rebuild wanted to build a bunch of ~x86 stuff (mod_php among them). I went back to the old version. I have three production servers running MySQL/Apache2/PHP, none of which will get this upgrade. For the 1st time in 3 years, Gentoo is really pissing me off. -- gentoo-server@gentoo.org mailing list