Re: Upgrade MySql to 5.1: skip-bdb is deadly

2010-06-01 Thread Uwe Heinz Rudi Dippel
From: Stuart Henderson [...@spacehopper.org]

> I for preferred any message of an invalid parameter in the log file,
> instead of aborting.

If it stops mysql from running, people will take notice.
Many people will miss it if it's just in the log.

This argument is well understood, and I had it myself. Only, when you're 
responsible for a machine; or when you're the first to be hit, and not work 
with MySQL all the time, my.cnf might not be the first item to look at, or even 
think of. 
Look at the messages. There is more about stuff being disabled, mysql_upgrade 
to be run ... :
100531 20:37:22 mysqld_safe Starting mysqld daemon with databases from 
/var/mysql
100531 20:37:23 [Note] Plugin 'FEDERATED' is disabled.
100531 20:37:23 [Note] Plugin 'InnoDB' is disabled.
/usr/local/libexec/mysqld: Table 'mysql.plugin' doesn't exist
100531 20:37:23 [ERROR] Can't open the mysql.plugin table. Please run 
mysql_upgrade to create it.
100531 20:37:23 [ERROR] /usr/local/libexec/mysqld: unknown option '--skip-bdb'
100531 20:37:23 [ERROR] Aborting
I actually started trying to enable 'FEDERATED' and 'innoDB'. 'Note's, okay. 
Then I tried to force it to start for the mysql_upgrade. If an option is 
unknown, as here, I would simply not have expected the thing to abort.
With my hat as system administrator, I have lost two days of life expectancy 
with this failure.
Seriously, what is actually wrong with skipping configuration lines that are 
unambiguously out of place and/or not understood?
I for one - and I guess everyone worth his money - check my /var/log files 
daily. Not necessarily /var/mysql/site.com.err. 

Not intending to contradict you, there might be situations when an unknown 
option is better graceful left aside, than dying without grace.

Uwe




Re: Upgrade MySql to 5.1: skip-bdb is deadly

2010-06-01 Thread Stuart Henderson
On 2010/06/01 18:06, Uwe Dippel wrote:
> On Tue, Jun 1, 2010 at 5:18 PM, Antti Harri  wrote:
> 
> > I wasn't aware either and I had some weird problems when I upgraded from 5.0
> > to 5.1. I recall they were mostly procedure/trigger related.
> 
> Yep, that's what the mysql_upgrade corrected here, mostly.
> 
> Still, maybe someone should complain upstream about this behaviour:
> 100531 20:37:23 [ERROR] /usr/local/libexec/mysqld: unknown option '--skip-bdb'
> 100531 20:37:23 [ERROR] Aborting
> ?
> 
> A number of people have been bitten (lucky, for me, so to say) and had
> their application aborted.
> What, actually, is wrong to abort a configuration setting
> # why not?
> this is totally nonsense
> # it really is!
> especially, when 'this is totally nonsense' is a deprecated, earlier
> valid, setting?
> 
> I for preferred any message of an invalid parameter in the log file,
> instead of aborting.

If it stops mysql from running, people will take notice.
Many people will miss it if it's just in the log.



Re: Updating MySQL (Was: Upgrade MySql to 5.1: skip-bdb is deadly)

2010-06-01 Thread Antti Harri

On Tue, 1 Jun 2010, Ian McWilliam wrote:


On 1/06/2010 11:35 PM, Antti Harri wrote:

On Tue, 1 Jun 2010, Antti Harri wrote:


I just updated to 5.1.47 from .45 and now mysqldump is segfaulting,
mysql_upgrade ran fine but it didn't help:


I would like to warn other users, that update totally broke mysql
here, I'm getting this also:

General error: 1548 Cannot load from mysql.. The table is probably 
corrupted




Please note there about 3 tables missing from 5.0 that are a part of 5.1. The 
best upgrade method is to dump your databases before updating to the 5.1 
release. Move your old /var/mysql directory out of the way, setup /var/mysql 
again with the 5.1 data using the usual install initial database method and 
reload your databases.


Yes but I'm talking about 5.1.45 -> 5.1.47 which I installed from a newest 
snapshot, hence the new subject too.


--
Antti Harri



Re: Updating MySQL (Was: Upgrade MySql to 5.1: skip-bdb is deadly)

2010-06-01 Thread Kevin Chadwick
On Tue, 1 Jun 2010 16:35:41 +0300 (EEST)
Antti Harri  wrote:

> On Tue, 1 Jun 2010, Antti Harri wrote:
> 
> > I just updated to 5.1.47 from .45 and now mysqldump is segfaulting,
> > mysql_upgrade ran fine but it didn't help:
> 
> I would like to warn other users, that update totally broke mysql
> here, I'm getting this also:
> 
> General error: 1548 Cannot load from mysql.. The table is probably 
> corrupted
> 
> -- 
> Antti Harri
> 

Does this have anything to do with changes by oracle. Maybe postgre
would be more stable.



Re: Updating MySQL (Was: Upgrade MySql to 5.1: skip-bdb is deadly)

2010-06-01 Thread Ian McWilliam

On 1/06/2010 11:35 PM, Antti Harri wrote:

On Tue, 1 Jun 2010, Antti Harri wrote:


I just updated to 5.1.47 from .45 and now mysqldump is segfaulting,
mysql_upgrade ran fine but it didn't help:


I would like to warn other users, that update totally broke mysql
here, I'm getting this also:

General error: 1548 Cannot load from mysql.. The table is probably 
corrupted




Please note there about 3 tables missing from 5.0 that are a part of 
5.1. The best upgrade method is to dump your databases before updating 
to the 5.1 release. Move your old /var/mysql directory out of the way, 
setup /var/mysql again with the 5.1 data using the usual install initial 
database method and reload your databases.


Ian McWilliam



Updating MySQL (Was: Upgrade MySql to 5.1: skip-bdb is deadly)

2010-06-01 Thread Antti Harri

On Tue, 1 Jun 2010, Antti Harri wrote:


I just updated to 5.1.47 from .45 and now mysqldump is segfaulting,
mysql_upgrade ran fine but it didn't help:


I would like to warn other users, that update totally broke mysql
here, I'm getting this also:

General error: 1548 Cannot load from mysql.. The table is probably 
corrupted


--
Antti Harri



Re: Upgrade MySql to 5.1: skip-bdb is deadly

2010-06-01 Thread Uwe Dippel
On Tue, Jun 1, 2010 at 5:18 PM, Antti Harri  wrote:

> I wasn't aware either and I had some weird problems when I upgraded from 5.0
> to 5.1. I recall they were mostly procedure/trigger related.

Yep, that's what the mysql_upgrade corrected here, mostly.

Still, maybe someone should complain upstream about this behaviour:
100531 20:37:23 [ERROR] /usr/local/libexec/mysqld: unknown option '--skip-bdb'
100531 20:37:23 [ERROR] Aborting
?

A number of people have been bitten (lucky, for me, so to say) and had
their application aborted.
What, actually, is wrong to abort a configuration setting
# why not?
this is totally nonsense
# it really is!
especially, when 'this is totally nonsense' is a deprecated, earlier
valid, setting?

I for preferred any message of an invalid parameter in the log file,
instead of aborting.

But that's my 2 sen.

Uwe



Re: Upgrade MySql to 5.1: skip-bdb is deadly

2010-06-01 Thread Antti Harri

Hi,

On Mon, 31 May 2010, Uwe Dippel wrote:

2. I wasn't aware of the need to run mysql_upgrade after an(y) upgrade. 
Actually, the man page says it should be done after any upgrade.

Should this eventually be mentioned in the install message?


I wasn't aware either and I had some weird problems when I 
upgraded from 5.0 to 5.1. I recall they were mostly procedure/trigger 
related. I don't think I ever had any problems with minor

updates with the 5.0 series though.

I just updated to 5.1.47 from .45 and now mysqldump is segfaulting,
mysql_upgrade ran fine but it didn't help:

mysqldump --quick --lock-all-tables --force --routines --triggers \
--all-databases --add-drop-table --add-drop-database -u $user -p$pass > \
${dir}/all_databases.sql
mysqldump: Couldn't execute '':  (1064)
Segmentation fault (core dumped)

#0  0x0124088c in mysql_fetch_row () from 
/usr/local/lib/mysql/libmysqlclient.so.20.0

--
Antti Harri



Upgrade MySql to 5.1: skip-bdb is deadly

2010-05-31 Thread Uwe Dippel

(I hope I'm the only one who fell for this.)

If you happen to have
skip-bdb
in your my.cnf, do not update to 4.7 (or the like).

My MySQL failed miserably at start:


100531 20:37:22 mysqld_safe Starting mysqld daemon with databases from 
/var/mysql
100531 20:37:23 [Note] Plugin 'FEDERATED' is disabled.
100531 20:37:23 [Note] Plugin 'InnoDB' is disabled.
/usr/local/libexec/mysqld: Table 'mysql.plugin' doesn't exist
100531 20:37:23 [ERROR] Can't open the mysql.plugin table. Please run 
mysql_upgrade to create it.
100531 20:37:23 [ERROR] /usr/local/libexec/mysqld: unknown option '--skip-bdb'
100531 20:37:23 [ERROR] Aborting

100531 20:37:23 [Note] /usr/local/libexec/mysqld: Shutdown complete


The tip with mysql_upgrade doesn't work, since MySQL needs to run for 
the upgrade. With the help of Google, I found the solution: disable 
skip-bdb. And then, running mysql_upgrade, quite a large number of 
tables were found that needed corrections.


1. Remove skip-bdb from your config-file!

2. I wasn't aware of the need to run mysql_upgrade after an(y) upgrade. 
Actually, the man page says it should be done after any upgrade.

Should this eventually be mentioned in the install message?

Uwe