Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Gentoo User (http://www.linux-archive.org/gentoo-user/)
-   -   Proper way of updating mysql from 5.0.90-r2 to 5.1.50? (http://www.linux-archive.org/gentoo-user/420991-proper-way-updating-mysql-5-0-90-r2-5-1-50-a.html)

Mick 08-31-2010 06:30 PM

Proper way of updating mysql from 5.0.90-r2 to 5.1.50?
 
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

Aniruddha 09-01-2010 08:00 PM

Proper way of updating mysql from 5.0.90-r2 to 5.1.50?
 
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.

Mick 09-01-2010 08:15 PM

Proper way of updating mysql from 5.0.90-r2 to 5.1.50?
 
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

Alan McKinnon 09-01-2010 09:05 PM

Proper way of updating mysql from 5.0.90-r2 to 5.1.50?
 
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

Dale 09-01-2010 09:05 PM

Proper way of updating mysql from 5.0.90-r2 to 5.1.50?
 
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

:-) :-)

Alex Schuster 09-01-2010 09:18 PM

Proper way of updating mysql from 5.0.90-r2 to 5.1.50?
 
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

Tanstaafl 09-01-2010 09:25 PM

Proper way of updating mysql from 5.0.90-r2 to 5.1.50?
 
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??

Mick 09-01-2010 09:38 PM

Proper way of updating mysql from 5.0.90-r2 to 5.1.50?
 
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

Alex Schuster 09-01-2010 10:45 PM

Proper way of updating mysql from 5.0.90-r2 to 5.1.50?
 
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

Dale 09-01-2010 11:09 PM

Proper way of updating mysql from 5.0.90-r2 to 5.1.50?
 
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

:-) :-)


All times are GMT. The time now is 09:53 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.