* [gentoo-user] Proper way of updating mysql from 5.0.90-r2 to 5.1.50? @ 2010-08-31 17:32 Jarry 2010-08-31 18:30 ` Mick 0 siblings, 1 reply; 21+ messages in thread From: Jarry @ 2010-08-31 17:32 UTC (permalink / raw To: gentoo-user Hi, what is the proper way of updating mysql? I did it as with any other package, following this sequence: emerge --ask --update --deep --newuse world [ebuild N ] net-misc/curl-7.20.0-r2 USE="idn ipv6 ssl -ares -gnutls -kerberos -ldap -libssh2 -nss -test" [ebuild N ] dev-util/cmake-2.8.1-r2 USE="ncurses -emacs -qt4 -vim-syntax" [ebuild U ] dev-db/mysql-5.1.50 [5.0.90-r2] USE="-pbxt% -xtradb%" [ebuild U ] virtual/mysql-5.1 [5.0] emerge --depclean revdep-rebuild /etc/init.d/mysqld stop /etc/init.d/mysqld start But this is apparently not the proper way, because after restarting the server, apache does not show my web-page reporting there is no such a database. I checked it with phpmyadmin, and really, there is absolutely no database in mysql! I quickly restored backup version which I have done just before trying mysql-update, so my web-site is up and running. Now I would like to update mysql the right way, I but do not know how to do it... Jarry -- _______________________________________________________________ This mailbox accepts e-mails only from selected mailing-lists! Everything else is considered to be spam and therefore deleted. ^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [gentoo-user] Proper way of updating mysql from 5.0.90-r2 to 5.1.50? 2010-08-31 17:32 [gentoo-user] Proper way of updating mysql from 5.0.90-r2 to 5.1.50? Jarry @ 2010-08-31 18:30 ` Mick 2010-09-01 20:00 ` Aniruddha 2010-09-04 5:53 ` Jarry 0 siblings, 2 replies; 21+ messages in thread From: Mick @ 2010-08-31 18:30 UTC (permalink / raw To: gentoo-user [-- Attachment #1: Type: Text/Plain, Size: 1570 bytes --] On Tuesday 31 August 2010 18:32:04 Jarry wrote: > Hi, > what is the proper way of updating mysql? I did it as with > any other package, following this sequence: > > emerge --ask --update --deep --newuse world > [ebuild N ] net-misc/curl-7.20.0-r2 USE="idn ipv6 ssl -ares -gnutls > -kerberos -ldap -libssh2 -nss -test" > [ebuild N ] dev-util/cmake-2.8.1-r2 USE="ncurses -emacs -qt4 > -vim-syntax" > [ebuild U ] dev-db/mysql-5.1.50 [5.0.90-r2] USE="-pbxt% -xtradb%" > [ebuild U ] virtual/mysql-5.1 [5.0] > emerge --depclean > revdep-rebuild > /etc/init.d/mysqld stop > /etc/init.d/mysqld start > > But this is apparently not the proper way, because after > restarting the server, apache does not show my web-page > reporting there is no such a database. I checked it with > phpmyadmin, and really, there is absolutely no database > in mysql! > > I quickly restored backup version which I have done just > before trying mysql-update, so my web-site is up and running. > Now I would like to update mysql the right way, I but do not > know how to do it... Hi Jarry, Some years ago I ran into some similar problem, I can't recall exactly what. Lost in folklore (wiki?) were some instructions to first stop mysql before you update it and I have been following them since. I stop apach & mysql, run the update, dispatch-conf and then restart them both. Haven't had problems since. There may be a better way for doing this - in which case others who know better will hopefully chime in. -- Regards, Mick [-- Attachment #2: This is a digitally signed message part. --] [-- Type: application/pgp-signature, Size: 198 bytes --] ^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [gentoo-user] Proper way of updating mysql from 5.0.90-r2 to 5.1.50? 2010-08-31 18:30 ` Mick @ 2010-09-01 20:00 ` Aniruddha 2010-09-01 20:15 ` Mick 2010-09-02 5:10 ` kashani 2010-09-04 5:53 ` Jarry 1 sibling, 2 replies; 21+ messages in thread From: Aniruddha @ 2010-09-01 20:00 UTC (permalink / raw To: gentoo-user On Tuesday 31 August 2010 20:30:55 Mick wrote: > > But this is apparently not the proper way, because after > > restarting the server, apache does not show my web-page > > reporting there is no such a database. I checked it with > > phpmyadmin, and really, there is absolutely no database > > in mysql! > > > > I quickly restored backup version which I have done just > > before trying mysql-update, so my web-site is up and running. > > Now I would like to update mysql the right way, I but do not > > know how to do it... > > Hi Jarry, > > Some years ago I ran into some similar problem, I can't recall exactly > what. Lost in folklore (wiki?) were some instructions to first stop mysql > before you update it and I have been following them since. > > I stop apach & mysql, run the update, dispatch-conf and then restart them > both. Haven't had problems since. > > There may be a better way for doing this - in which case others who know > better will hopefully chime in. I'm curious as well. Imo it shouldn't be necessary to stop mysql server for each update. ^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [gentoo-user] Proper way of updating mysql from 5.0.90-r2 to 5.1.50? 2010-09-01 20:00 ` Aniruddha @ 2010-09-01 20:15 ` Mick 2010-09-01 21:05 ` Alan McKinnon 2010-09-01 21:05 ` Dale 2010-09-02 5:10 ` kashani 1 sibling, 2 replies; 21+ messages in thread From: Mick @ 2010-09-01 20:15 UTC (permalink / raw To: gentoo-user 2010/9/1 Aniruddha <mailingdotlist@gmail.com>: > On Tuesday 31 August 2010 20:30:55 Mick wrote: >> > But this is apparently not the proper way, because after >> > restarting the server, apache does not show my web-page >> > reporting there is no such a database. I checked it with >> > phpmyadmin, and really, there is absolutely no database >> > in mysql! >> > >> > I quickly restored backup version which I have done just >> > before trying mysql-update, so my web-site is up and running. >> > Now I would like to update mysql the right way, I but do not >> > know how to do it... >> >> Hi Jarry, >> >> Some years ago I ran into some similar problem, I can't recall exactly >> what. Lost in folklore (wiki?) were some instructions to first stop mysql >> before you update it and I have been following them since. >> >> I stop apach & mysql, run the update, dispatch-conf and then restart them >> both. Haven't had problems since. >> >> There may be a better way for doing this - in which case others who know >> better will hopefully chime in. > > I'm curious as well. Imo it shouldn't be necessary to stop mysql server for > each update. Actually, this problem may be more sinister ... a bug? I also updated to the latest stable and as soon as I tried to restart apache I got: ========================================= # /etc/init.d/apache2 start * apache2 has detected an error in your setup: apache2: Syntax error on line 155 of /etc/apache2/httpd.conf: Syntax error on line 4 of /etc/apache2/modules.d/70_mod_php5.conf: Cannot load /usr/lib/apache2/modules/libphp5.so into server: libmysqlclient.so.15: cannot open shared object file: No such file or directory ========================================= What the ... ? Line 155 of my /etc/apache2/httpd.conf says: Include /etc/apache2/modules.d/*.conf Line 4 of /etc/apache2/modules.d/70_mod_php5.conf, says: LoadModule php5_module modules/libphp5.so Also, I seem to have modules/libphp5.so and is world readable: $ ls -la /usr/lib/apache2/modules/libphp5.so -rw-r--r-- 1 root root 5720576 Aug 13 20:09 /usr/lib/apache2/modules/libphp5.so I am downgrading now before a lynch mob arrives, but has anyone else run into this problem? PS. I'm running www-servers/apache-2.2.16 -- Regards, Mick ^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [gentoo-user] Proper way of updating mysql from 5.0.90-r2 to 5.1.50? 2010-09-01 20:15 ` Mick @ 2010-09-01 21:05 ` Alan McKinnon 2010-09-01 21:05 ` Dale 1 sibling, 0 replies; 21+ messages in thread From: Alan McKinnon @ 2010-09-01 21:05 UTC (permalink / raw To: gentoo-user Apparently, though unproven, at 22:15 on Wednesday 01 September 2010, Mick did opine thusly: > 2010/9/1 Aniruddha <mailingdotlist@gmail.com>: > > On Tuesday 31 August 2010 20:30:55 Mick wrote: > >> > But this is apparently not the proper way, because after > >> > restarting the server, apache does not show my web-page > >> > reporting there is no such a database. I checked it with > >> > phpmyadmin, and really, there is absolutely no database > >> > in mysql! > >> > > >> > I quickly restored backup version which I have done just > >> > before trying mysql-update, so my web-site is up and running. > >> > Now I would like to update mysql the right way, I but do not > >> > know how to do it... > >> > >> Hi Jarry, > >> > >> Some years ago I ran into some similar problem, I can't recall exactly > >> what. Lost in folklore (wiki?) were some instructions to first stop > >> mysql before you update it and I have been following them since. > >> > >> I stop apach & mysql, run the update, dispatch-conf and then restart > >> them both. Haven't had problems since. > >> > >> There may be a better way for doing this - in which case others who know > >> better will hopefully chime in. > > > > I'm curious as well. Imo it shouldn't be necessary to stop mysql server > > for each update. > > Actually, this problem may be more sinister ... a bug? > > I also updated to the latest stable and as soon as I tried to restart > apache I got: > ========================================= > # /etc/init.d/apache2 start > * apache2 has detected an error in your setup: > apache2: Syntax error on line 155 of /etc/apache2/httpd.conf: Syntax error > on line 4 of /etc/apache2/modules.d/70_mod_php5.conf: Cannot load > /usr/lib/apache2/modules/libphp5.so into server: libmysqlclient.so.15: > cannot open shared object file: No such file or directory > ========================================= > > What the ... ? > > Line 155 of my /etc/apache2/httpd.conf says: > > Include /etc/apache2/modules.d/*.conf > > Line 4 of /etc/apache2/modules.d/70_mod_php5.conf, says: > > LoadModule php5_module modules/libphp5.so > > Also, I seem to have modules/libphp5.so and is world readable: > > $ ls -la /usr/lib/apache2/modules/libphp5.so > -rw-r--r-- 1 root root 5720576 Aug 13 20:09 > /usr/lib/apache2/modules/libphp5.so > > > I am downgrading now before a lynch mob arrives, but has anyone else > run into this problem? > > PS. I'm running www-servers/apache-2.2.16 You got so close to the real answer, just one more step :-) $ ldd /usr/lib64/apache2/modules/libphp5.so | grep mysql libmysqlclient_r.so.16 => /usr/lib64/mysql/libmysqlclient_r.so.16 (0x00007f185d528000) Think this through: you have a complex piece of software with it's config in memory. A library that uses a library uses a library. Then you remove that last library and replace it with version x+1. How do you expect the library in the middle of the chain to know about that? Via magic? Voodoo? Some automatic-check-if-stuff-changed-cron-job? No, you just simply restart services that use things that changed, especially if they used (then closed) the file you just changed. You might also need revdep-rebuild to get everything back 100%. It's all just situation-normal for a source based distro. Nothing you can, or should, try to "fix". -- alan dot mckinnon at gmail dot com ^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [gentoo-user] Proper way of updating mysql from 5.0.90-r2 to 5.1.50? 2010-09-01 20:15 ` Mick 2010-09-01 21:05 ` Alan McKinnon @ 2010-09-01 21:05 ` Dale 2010-09-01 21:18 ` Alex Schuster 1 sibling, 1 reply; 21+ messages in thread From: Dale @ 2010-09-01 21:05 UTC (permalink / raw To: gentoo-user Mick wrote: > 2010/9/1 Aniruddha<mailingdotlist@gmail.com>: > >> On Tuesday 31 August 2010 20:30:55 Mick wrote: >> >>>> But this is apparently not the proper way, because after >>>> restarting the server, apache does not show my web-page >>>> reporting there is no such a database. I checked it with >>>> phpmyadmin, and really, there is absolutely no database >>>> in mysql! >>>> >>>> I quickly restored backup version which I have done just >>>> before trying mysql-update, so my web-site is up and running. >>>> Now I would like to update mysql the right way, I but do not >>>> know how to do it... >>>> >>> Hi Jarry, >>> >>> Some years ago I ran into some similar problem, I can't recall exactly >>> what. Lost in folklore (wiki?) were some instructions to first stop mysql >>> before you update it and I have been following them since. >>> >>> I stop apach& mysql, run the update, dispatch-conf and then restart them >>> both. Haven't had problems since. >>> >>> There may be a better way for doing this - in which case others who know >>> better will hopefully chime in. >>> >> I'm curious as well. Imo it shouldn't be necessary to stop mysql server for >> each update. >> > Actually, this problem may be more sinister ... a bug? > > I also updated to the latest stable and as soon as I tried to restart > apache I got: > ========================================= > # /etc/init.d/apache2 start > * apache2 has detected an error in your setup: > apache2: Syntax error on line 155 of /etc/apache2/httpd.conf: Syntax error on > line 4 of /etc/apache2/modules.d/70_mod_php5.conf: Cannot load > /usr/lib/apache2/modules/libphp5.so into server: libmysqlclient.so.15: cannot > open shared object file: No such file or directory > ========================================= > > What the ... ? > > Line 155 of my /etc/apache2/httpd.conf says: > > Include /etc/apache2/modules.d/*.conf > > Line 4 of /etc/apache2/modules.d/70_mod_php5.conf, says: > > LoadModule php5_module modules/libphp5.so > > Also, I seem to have modules/libphp5.so and is world readable: > > $ ls -la /usr/lib/apache2/modules/libphp5.so > -rw-r--r-- 1 root root 5720576 Aug 13 20:09 /usr/lib/apache2/modules/libphp5.so > > > I am downgrading now before a lynch mob arrives, but has anyone else > run into this problem? > > PS. I'm running www-servers/apache-2.2.16 > I'm no expert on this package so take this with a grain of salt. Mine just updated and portage said to run "emerge @preserved-rebuild" which I did. Thing is, one of the packages failed to emerge so here I sit. The error says something is missing which is the same reason the "emerge @preserved-rebuild" won't finish. So, looks like you need to rebuild some stuff but don't hold your breath on being able to. There is a thread on the forums already if you want to monitor it. http://forums.gentoo.org/viewtopic-t-842671.html Dale :-) :-) ^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [gentoo-user] Proper way of updating mysql from 5.0.90-r2 to 5.1.50? 2010-09-01 21:05 ` Dale @ 2010-09-01 21:18 ` Alex Schuster 2010-09-01 21:25 ` Tanstaafl 0 siblings, 1 reply; 21+ messages in thread From: Alex Schuster @ 2010-09-01 21:18 UTC (permalink / raw To: gentoo-user Dale writes: > I'm no expert on this package so take this with a grain of salt. Mine > just updated and portage said to run "emerge @preserved-rebuild" which > I did. Thing is, one of the packages failed to emerge so here I sit. > The error says something is missing which is the same reason the > "emerge @preserved-rebuild" won't finish. > > So, looks like you need to rebuild some stuff but don't hold your > breath on being able to. There is a thread on the forums already if > you want to monitor it. I think it's not an urgent problem when this happens. With portage 2.2 and the preserve-libs FEATURE, old libraries are not deleted when an update installs new, incompatible library. This happens when emerge @preserved- rebuild has finished rebuilding all packages using the old library, so they now use the new one. Without this feature, the old library is deleted after the update, and you need to use revdep-rebuild to rebuild all the stuff that uses the no longer existing library. I always thought of this as a big problem with Gentoo, and it's great that it no lonoger is. Wonko ^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [gentoo-user] Proper way of updating mysql from 5.0.90-r2 to 5.1.50? 2010-09-01 21:18 ` Alex Schuster @ 2010-09-01 21:25 ` Tanstaafl 2010-09-01 21:38 ` Mick 2010-09-01 22:45 ` Alex Schuster 0 siblings, 2 replies; 21+ messages in thread From: Tanstaafl @ 2010-09-01 21:25 UTC (permalink / raw To: gentoo-user On 2010-09-01 5:18 PM, Alex Schuster <wonko@wonkology.org> wrote: > I think it's not an urgent problem when this happens. With portage > 2.2 and the preserve-libs FEATURE, You are assuming everyone runs unstable portage?? ^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [gentoo-user] Proper way of updating mysql from 5.0.90-r2 to 5.1.50? 2010-09-01 21:25 ` Tanstaafl @ 2010-09-01 21:38 ` Mick 2010-09-02 9:55 ` Dale 2010-09-01 22:45 ` Alex Schuster 1 sibling, 1 reply; 21+ messages in thread From: Mick @ 2010-09-01 21:38 UTC (permalink / raw To: gentoo-user [-- Attachment #1: Type: Text/Plain, Size: 462 bytes --] On Wednesday 01 September 2010 22:25:39 Tanstaafl wrote: > On 2010-09-01 5:18 PM, Alex Schuster <wonko@wonkology.org> wrote: > > I think it's not an urgent problem when this happens. With portage > > 2.2 and the preserve-libs FEATURE, > > You are assuming everyone runs unstable portage?? I'm running vanilla here, so will run revdep-rebuild when I get a minute. Until then I downgraded, because I was being shouted at ... O_O -- Regards, Mick [-- Attachment #2: This is a digitally signed message part. --] [-- Type: application/pgp-signature, Size: 198 bytes --] ^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [gentoo-user] Proper way of updating mysql from 5.0.90-r2 to 5.1.50? 2010-09-01 21:38 ` Mick @ 2010-09-02 9:55 ` Dale 2010-09-02 18:09 ` Mick 0 siblings, 1 reply; 21+ messages in thread From: Dale @ 2010-09-02 9:55 UTC (permalink / raw To: gentoo-user Mick wrote: > On Wednesday 01 September 2010 22:25:39 Tanstaafl wrote: > >> On 2010-09-01 5:18 PM, Alex Schuster<wonko@wonkology.org> wrote: >> >>> I think it's not an urgent problem when this happens. With portage >>> 2.2 and the preserve-libs FEATURE, >>> >> You are assuming everyone runs unstable portage?? >> > I'm running vanilla here, so will run revdep-rebuild when I get a minute. > Until then I downgraded, because I was being shouted at ... O_O > I added "=dev-db/mysql-5.1.50-r1" to package.keywords and everything compiled cleanly. Roach report here. http://bugs.gentoo.org/show_bug.cgi?id=335615 Hope that helps. Dale :-) :-) ^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [gentoo-user] Proper way of updating mysql from 5.0.90-r2 to 5.1.50? 2010-09-02 9:55 ` Dale @ 2010-09-02 18:09 ` Mick 0 siblings, 0 replies; 21+ messages in thread From: Mick @ 2010-09-02 18:09 UTC (permalink / raw To: gentoo-user [-- Attachment #1: Type: Text/Plain, Size: 776 bytes --] On Thursday 02 September 2010 10:55:03 Dale wrote: > Mick wrote: > > On Wednesday 01 September 2010 22:25:39 Tanstaafl wrote: > >> On 2010-09-01 5:18 PM, Alex Schuster<wonko@wonkology.org> wrote: > >>> I think it's not an urgent problem when this happens. With portage > >>> 2.2 and the preserve-libs FEATURE, > >> > >> You are assuming everyone runs unstable portage?? > > > > I'm running vanilla here, so will run revdep-rebuild when I get a minute. > > Until then I downgraded, because I was being shouted at ... O_O > > I added "=dev-db/mysql-5.1.50-r1" to package.keywords and everything > compiled cleanly. Roach report here. > > http://bugs.gentoo.org/show_bug.cgi?id=335615 > > Hope that helps. Thanks Dale! :-) -- Regards, Mick [-- Attachment #2: This is a digitally signed message part. --] [-- Type: application/pgp-signature, Size: 198 bytes --] ^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [gentoo-user] Proper way of updating mysql from 5.0.90-r2 to 5.1.50? 2010-09-01 21:25 ` Tanstaafl 2010-09-01 21:38 ` Mick @ 2010-09-01 22:45 ` Alex Schuster 2010-09-01 23:09 ` Dale 1 sibling, 1 reply; 21+ messages in thread From: Alex Schuster @ 2010-09-01 22:45 UTC (permalink / raw To: gentoo-user Tanstaafl writes: > On 2010-09-01 5:18 PM, Alex Schuster <wonko@wonkology.org> wrote: > > I think it's not an urgent problem when this happens. With portage > > 2.2 and the preserve-libs FEATURE, > > You are assuming everyone runs unstable portage?? No, but I replied to Dale, and he apparently does. Wonko ^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [gentoo-user] Proper way of updating mysql from 5.0.90-r2 to 5.1.50? 2010-09-01 22:45 ` Alex Schuster @ 2010-09-01 23:09 ` Dale 0 siblings, 0 replies; 21+ messages in thread From: Dale @ 2010-09-01 23:09 UTC (permalink / raw To: gentoo-user Alex Schuster wrote: > Tanstaafl writes: > > >> On 2010-09-01 5:18 PM, Alex Schuster<wonko@wonkology.org> wrote: >> >>> I think it's not an urgent problem when this happens. With portage >>> 2.2 and the preserve-libs FEATURE, >>> >> You are assuming everyone runs unstable portage?? >> > No, but I replied to Dale, and he apparently does. > > Wonko > > > I do run unstable portage. My point was that the upgrade breaks a dependency and that the dependency won't complete the compile process. So, if a person has not yet upgraded, you may be wise to wait until this gets fixed. This would be good advice regardless of what version of portage a person is using. Dale :-) :-) ^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [gentoo-user] Proper way of updating mysql from 5.0.90-r2 to 5.1.50? 2010-09-01 20:00 ` Aniruddha 2010-09-01 20:15 ` Mick @ 2010-09-02 5:10 ` kashani 2010-09-02 18:12 ` Mick 1 sibling, 1 reply; 21+ messages in thread From: kashani @ 2010-09-02 5:10 UTC (permalink / raw To: gentoo-user On 9/1/2010 1:00 PM, Aniruddha wrote: > On Tuesday 31 August 2010 20:30:55 Mick wrote: >>> But this is apparently not the proper way, because after >>> restarting the server, apache does not show my web-page >>> reporting there is no such a database. I checked it with >>> phpmyadmin, and really, there is absolutely no database >>> in mysql! >>> >>> I quickly restored backup version which I have done just >>> before trying mysql-update, so my web-site is up and running. >>> Now I would like to update mysql the right way, I but do not >>> know how to do it... >> >> Hi Jarry, >> >> Some years ago I ran into some similar problem, I can't recall exactly >> what. Lost in folklore (wiki?) were some instructions to first stop mysql >> before you update it and I have been following them since. >> >> I stop apach& mysql, run the update, dispatch-conf and then restart them >> both. Haven't had problems since. >> >> There may be a better way for doing this - in which case others who know >> better will hopefully chime in. > > I'm curious as well. Imo it shouldn't be necessary to stop mysql server for > each update. > I did in place upgrades from 5.0.12 or so on up to 5.0.77 or so. You're unlikely to have problems upgrading Mysql within 5.0.x. If you're moving up to 5.1, I would definitely stop inserts into Mysql, dump mysql, stop mysql, make a copy of /var/lib/mysql just in case, then upgrade to 5.1. Mysql should be able to upgrade your database in place, but it might not. If mysql-update doesn't work, importing a dumb is the most reliable way to get your data into 5.1. As other people have pointed out you'll need to revdep-rebuild or preserve the older client libs. kashani ^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [gentoo-user] Proper way of updating mysql from 5.0.90-r2 to 5.1.50? 2010-09-02 5:10 ` kashani @ 2010-09-02 18:12 ` Mick 2010-09-03 3:40 ` kashani 0 siblings, 1 reply; 21+ messages in thread From: Mick @ 2010-09-02 18:12 UTC (permalink / raw To: gentoo-user [-- Attachment #1: Type: Text/Plain, Size: 1981 bytes --] On Thursday 02 September 2010 06:10:05 kashani wrote: > On 9/1/2010 1:00 PM, Aniruddha wrote: > > On Tuesday 31 August 2010 20:30:55 Mick wrote: > >>> But this is apparently not the proper way, because after > >>> restarting the server, apache does not show my web-page > >>> reporting there is no such a database. I checked it with > >>> phpmyadmin, and really, there is absolutely no database > >>> in mysql! > >>> > >>> I quickly restored backup version which I have done just > >>> before trying mysql-update, so my web-site is up and running. > >>> Now I would like to update mysql the right way, I but do not > >>> know how to do it... > >> > >> Hi Jarry, > >> > >> Some years ago I ran into some similar problem, I can't recall exactly > >> what. Lost in folklore (wiki?) were some instructions to first stop > >> mysql before you update it and I have been following them since. > >> > >> I stop apach& mysql, run the update, dispatch-conf and then restart > >> them both. Haven't had problems since. > >> > >> There may be a better way for doing this - in which case others who know > >> better will hopefully chime in. > > > > I'm curious as well. Imo it shouldn't be necessary to stop mysql server > > for each update. > > I did in place upgrades from 5.0.12 or so on up to 5.0.77 or so. You're > unlikely to have problems upgrading Mysql within 5.0.x. If you're moving > up to 5.1, I would definitely stop inserts into Mysql, How do you stop inserts? Would this also apply to MyISAMs or only InnoDB? > dump mysql, stop > mysql, make a copy of /var/lib/mysql just in case, then upgrade to 5.1. > Mysql should be able to upgrade your database in place, but it might > not. If mysql-update doesn't work, importing a dumb is the most reliable > way to get your data into 5.1. > As other people have pointed out you'll need to revdep-rebuild or > preserve the older client libs. > > kashani -- Regards, Mick [-- Attachment #2: This is a digitally signed message part. --] [-- Type: application/pgp-signature, Size: 198 bytes --] ^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [gentoo-user] Proper way of updating mysql from 5.0.90-r2 to 5.1.50? 2010-09-02 18:12 ` Mick @ 2010-09-03 3:40 ` kashani 0 siblings, 0 replies; 21+ messages in thread From: kashani @ 2010-09-03 3:40 UTC (permalink / raw To: gentoo-user On 9/2/2010 11:12 AM, Mick wrote: > On Thursday 02 September 2010 06:10:05 kashani wrote: >> On 9/1/2010 1:00 PM, Aniruddha wrote: >>> On Tuesday 31 August 2010 20:30:55 Mick wrote: >>>>> But this is apparently not the proper way, because after >>>>> restarting the server, apache does not show my web-page >>>>> reporting there is no such a database. I checked it with >>>>> phpmyadmin, and really, there is absolutely no database >>>>> in mysql! >>>>> >>>>> I quickly restored backup version which I have done just >>>>> before trying mysql-update, so my web-site is up and running. >>>>> Now I would like to update mysql the right way, I but do not >>>>> know how to do it... >>>> >>>> Hi Jarry, >>>> >>>> Some years ago I ran into some similar problem, I can't recall exactly >>>> what. Lost in folklore (wiki?) were some instructions to first stop >>>> mysql before you update it and I have been following them since. >>>> >>>> I stop apach& mysql, run the update, dispatch-conf and then restart >>>> them both. Haven't had problems since. >>>> >>>> There may be a better way for doing this - in which case others who know >>>> better will hopefully chime in. >>> >>> I'm curious as well. Imo it shouldn't be necessary to stop mysql server >>> for each update. >> >> I did in place upgrades from 5.0.12 or so on up to 5.0.77 or so. You're >> unlikely to have problems upgrading Mysql within 5.0.x. If you're moving >> up to 5.1, I would definitely stop inserts into Mysql, > > How do you stop inserts? Would this also apply to MyISAMs or only InnoDB? Depends on what you can get away with on your system. Applies to both MyISAM and Innodb though generally it's easier to dump myisam tables. 1. restart Mysql with no network, dump, update, restart with network. This of course assumes you have no local clients but you can chmod 600 the mysql.sock as well. I've done it this way in the past, but it's not terribly fancy. Works well in environment where you're not exactly sure what's writing to your db. 2. mysql -u root then FLUSH TABLES WITH READ LOCK while you're holding that connection open, mysqldump. I feel like I'm forgetting something here, but I think it is this simple. 3. Make a slave. Update it, test, all that fun stuff. Point to it, then update the master which is a slave of the slave. Works well, pretty easy, but you need to be comfortable with setting up replication. 4. LVM snapshots, still need to lock the tables, but usually it's fast. Good write up here. http://www.mysqlperformanceblog.com/2006/08/21/using-lvm-for-mysql-backup-and-replication-setup/ 5. Don't bother with a backup. shut down mysql, rsync -av /var/lib/mysql/ var/lib/mysql.orig/ , upgrade, start mysql. If it doesn't work shut down mysql and move the old dir back into place. couple more links http://dev.mysql.com/doc/refman/5.1/en/backup-policy.html http://dev.mysql.com/doc/refman/5.1/en/backup-methods.html kashani ^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [gentoo-user] Proper way of updating mysql from 5.0.90-r2 to 5.1.50? 2010-08-31 18:30 ` Mick 2010-09-01 20:00 ` Aniruddha @ 2010-09-04 5:53 ` Jarry 2010-09-04 21:43 ` kashani 1 sibling, 1 reply; 21+ messages in thread From: Jarry @ 2010-09-04 5:53 UTC (permalink / raw To: gentoo-user On 31. 8. 2010 20:30, Mick wrote: > I stop apach& mysql, run the update, dispatch-conf and then restart them > both. Haven't had problems since. I tried it that way: /etc/init.d/apache2 stop /etc/init.d/mysql stop emerge --ask --update --deep --newuse world emerge --depclean revdep-rebuild /etc/init.d/mysql start /etc/init.d/apache2 start Still the same: databases are gone, mysql is empty. Only users are there. This is strange: how can updating mysql from one stable version to higher stable cause complete loss of databases??? Jarry -- _______________________________________________________________ This mailbox accepts e-mails only from selected mailing-lists! Everything else is considered to be spam and therefore deleted. ^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [gentoo-user] Proper way of updating mysql from 5.0.90-r2 to 5.1.50? 2010-09-04 5:53 ` Jarry @ 2010-09-04 21:43 ` kashani 2010-09-04 22:30 ` Mick 0 siblings, 1 reply; 21+ messages in thread From: kashani @ 2010-09-04 21:43 UTC (permalink / raw To: gentoo-user On 9/3/2010 10:53 PM, Jarry wrote: > On 31. 8. 2010 20:30, Mick wrote: > >> I stop apach& mysql, run the update, dispatch-conf and then restart them >> both. Haven't had problems since. > > I tried it that way: > > /etc/init.d/apache2 stop > /etc/init.d/mysql stop > emerge --ask --update --deep --newuse world > emerge --depclean > revdep-rebuild > /etc/init.d/mysql start > /etc/init.d/apache2 start > > Still the same: databases are gone, mysql is empty. Only users > are there. This is strange: how can updating mysql from one stable > version to higher stable cause complete loss of databases??? > > Jarry > IIRC the default my.cnf changed for the worse in Gentoo's 5.1.x ebuild. Try making a copy of your original my.cnf and put it into place once you've upgraded. Else you may need to modify the mysql home and data paths in the new my.cnf to reflect where the database are actually installed. kashani ^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [gentoo-user] Proper way of updating mysql from 5.0.90-r2 to 5.1.50? 2010-09-04 21:43 ` kashani @ 2010-09-04 22:30 ` Mick 2010-09-05 9:29 ` Mick 0 siblings, 1 reply; 21+ messages in thread From: Mick @ 2010-09-04 22:30 UTC (permalink / raw To: gentoo-user [-- Attachment #1: Type: Text/Plain, Size: 1357 bytes --] On Saturday 04 September 2010 22:43:01 kashani wrote: > On 9/3/2010 10:53 PM, Jarry wrote: > > On 31. 8. 2010 20:30, Mick wrote: > >> I stop apach& mysql, run the update, dispatch-conf and then restart them > >> both. Haven't had problems since. > > > > I tried it that way: > > > > /etc/init.d/apache2 stop > > /etc/init.d/mysql stop > > emerge --ask --update --deep --newuse world > > emerge --depclean > > revdep-rebuild > > /etc/init.d/mysql start > > /etc/init.d/apache2 start > > > > Still the same: databases are gone, mysql is empty. Only users > > are there. This is strange: how can updating mysql from one stable > > version to higher stable cause complete loss of databases??? > > > > Jarry > > IIRC the default my.cnf changed for the worse in Gentoo's 5.1.x ebuild. > Try making a copy of your original my.cnf and put it into place once > you've upgraded. Else you may need to modify the mysql home and data > paths in the new my.cnf to reflect where the database are actually > installed. I just updated to mysql-5.1.50-r1 on a x86 box, ran revdep-rebuild which amidst others rebuilt apache and php and all is good now. dispatch-conf updated only a couple of lines on the config file. The default paths were not affected on any of the 5 mysql databases I'm running currently. -- Regards, Mick [-- Attachment #2: This is a digitally signed message part. --] [-- Type: application/pgp-signature, Size: 198 bytes --] ^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [gentoo-user] Proper way of updating mysql from 5.0.90-r2 to 5.1.50? 2010-09-04 22:30 ` Mick @ 2010-09-05 9:29 ` Mick 2010-09-05 10:08 ` Mick 0 siblings, 1 reply; 21+ messages in thread From: Mick @ 2010-09-05 9:29 UTC (permalink / raw To: gentoo-user [-- Attachment #1: Type: Text/Plain, Size: 1729 bytes --] On Saturday 04 September 2010 23:30:55 you wrote: > On Saturday 04 September 2010 22:43:01 kashani wrote: > > On 9/3/2010 10:53 PM, Jarry wrote: > > > On 31. 8. 2010 20:30, Mick wrote: > > >> I stop apach& mysql, run the update, dispatch-conf and then restart > > >> them both. Haven't had problems since. > > > > > > I tried it that way: > > > > > > /etc/init.d/apache2 stop > > > /etc/init.d/mysql stop > > > emerge --ask --update --deep --newuse world > > > emerge --depclean > > > revdep-rebuild > > > /etc/init.d/mysql start > > > /etc/init.d/apache2 start > > > > > > Still the same: databases are gone, mysql is empty. Only users > > > are there. This is strange: how can updating mysql from one stable > > > version to higher stable cause complete loss of databases??? > > > > > > Jarry > > > > IIRC the default my.cnf changed for the worse in Gentoo's 5.1.x ebuild. > > Try making a copy of your original my.cnf and put it into place once > > you've upgraded. Else you may need to modify the mysql home and data > > paths in the new my.cnf to reflect where the database are actually > > installed. > > I just updated to mysql-5.1.50-r1 on a x86 box, ran revdep-rebuild which > amidst others rebuilt apache and php and all is good now. dispatch-conf > updated only a couple of lines on the config file. > > The default paths were not affected on any of the 5 mysql databases I'm > running currently. Oops! I spake too soon! :-( I cannot access two databases. Both have #mysql50# infront of the name of the original database. What does this mean? How do I fix it? Other databases are fine, their names appearing without this strange prefix. -- Regards, Mick [-- Attachment #2: This is a digitally signed message part. --] [-- Type: application/pgp-signature, Size: 198 bytes --] ^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [gentoo-user] Proper way of updating mysql from 5.0.90-r2 to 5.1.50? 2010-09-05 9:29 ` Mick @ 2010-09-05 10:08 ` Mick 0 siblings, 0 replies; 21+ messages in thread From: Mick @ 2010-09-05 10:08 UTC (permalink / raw To: gentoo-user [-- Attachment #1: Type: Text/Plain, Size: 2603 bytes --] On Sunday 05 September 2010 10:29:29 you wrote: > On Saturday 04 September 2010 23:30:55 you wrote: > > On Saturday 04 September 2010 22:43:01 kashani wrote: > > > On 9/3/2010 10:53 PM, Jarry wrote: > > > > On 31. 8. 2010 20:30, Mick wrote: > > > >> I stop apach& mysql, run the update, dispatch-conf and then restart > > > >> them both. Haven't had problems since. > > > > > > > > I tried it that way: > > > > > > > > /etc/init.d/apache2 stop > > > > /etc/init.d/mysql stop > > > > emerge --ask --update --deep --newuse world > > > > emerge --depclean > > > > revdep-rebuild > > > > /etc/init.d/mysql start > > > > /etc/init.d/apache2 start > > > > > > > > Still the same: databases are gone, mysql is empty. Only users > > > > are there. This is strange: how can updating mysql from one stable > > > > version to higher stable cause complete loss of databases??? > > > > > > > > Jarry > > > > > > IIRC the default my.cnf changed for the worse in Gentoo's 5.1.x ebuild. > > > Try making a copy of your original my.cnf and put it into place once > > > you've upgraded. Else you may need to modify the mysql home and data > > > paths in the new my.cnf to reflect where the database are actually > > > installed. > > > > I just updated to mysql-5.1.50-r1 on a x86 box, ran revdep-rebuild which > > amidst others rebuilt apache and php and all is good now. dispatch-conf > > updated only a couple of lines on the config file. > > > > The default paths were not affected on any of the 5 mysql databases I'm > > running currently. > > Oops! I spake too soon! :-( > > I cannot access two databases. Both have #mysql50# infront of the name of > the original database. What does this mean? How do I fix it? Other > databases are fine, their names appearing without this strange prefix. I found the solution: mysql > ALTER DATABASE `#mysql50#dbname` UPGRADE DATA DIRECTORY NAME; as described here: http://mattiasgeniar.be/2010/08/07/mysql-upgrade-to-5-1-database-name-prefix- mysql50/ I am not sure if this is related with the problem that the O/P had - disappearing databases. The symptoms when the database with the new prefix is used to drive a CMS, was an error by apache saying that the database does not exist. Of course, it does exist but its name now has a funny prefix. Running mysql -u root -p and SHOW DATABASES; led me to finding out that the name had changed. BTW, /var/lib/mysql still showed the non-prefixed db names. Anyway, the above link was very helpful in resolving my problem. -- Regards, Mick [-- Attachment #2: This is a digitally signed message part. --] [-- Type: application/pgp-signature, Size: 198 bytes --] ^ permalink raw reply [flat|nested] 21+ messages in thread
end of thread, other threads:[~2010-09-05 10:09 UTC | newest] Thread overview: 21+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2010-08-31 17:32 [gentoo-user] Proper way of updating mysql from 5.0.90-r2 to 5.1.50? Jarry 2010-08-31 18:30 ` Mick 2010-09-01 20:00 ` Aniruddha 2010-09-01 20:15 ` Mick 2010-09-01 21:05 ` Alan McKinnon 2010-09-01 21:05 ` Dale 2010-09-01 21:18 ` Alex Schuster 2010-09-01 21:25 ` Tanstaafl 2010-09-01 21:38 ` Mick 2010-09-02 9:55 ` Dale 2010-09-02 18:09 ` Mick 2010-09-01 22:45 ` Alex Schuster 2010-09-01 23:09 ` Dale 2010-09-02 5:10 ` kashani 2010-09-02 18:12 ` Mick 2010-09-03 3:40 ` kashani 2010-09-04 5:53 ` Jarry 2010-09-04 21:43 ` kashani 2010-09-04 22:30 ` Mick 2010-09-05 9:29 ` Mick 2010-09-05 10:08 ` Mick
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox