>> > mysql-5.1.51 crashed recently and needed to be restarted.  This
>> > doesn't happen often with mysql but does from time to time.  Is this
>> > part of life with mysql or can it be prevented?
>>
>> This is not normal. None of my mysql instances crash frequently

Mine doesn't crash frequently.  Maybe once every 6 months, but I'd
prefer it didn't crash at all.

>> > I don't think I've
>> > changed the mysql config from default besides creating the necessary
>> > tables although I could be wrong.  /var/log/mysql/mysqld.err doesn't
>> > contain info about the crash but here's info from the restart:
>> >
>> > [Warning] No argument was provided to --log-bin, and --log-bin-index
>> > was not used; so replication may break when this MySQL server acts as
>> > a master and has his hostname changed!! Please use
>> > '--log-bin=mysqld-bin' to avoid this problem. /usr/sbin/mysqld: Table
>> > 'mysql.plugin' doesn't exist
>> > [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to
>> > create it.
>> > InnoDB: Started; log sequence number 0 43655
>> > [Note] Recovering after a crash using mysqld-bin
>> > [Note] Starting crash recovery...
>> > [Note] Crash recovery finished.
>> > [ERROR] Can't open and lock privilege tables: Table 'mysql.servers'
>> > doesn't exist
>> > [ERROR] Column count of mysql.db is wrong. Expected 22, found 20.
>> > Created with MySQL 50070, now running 50151. Please use mysql_upgrade
>> > to fix this error.
>>
>> Did you ever run mysql_upgrade as mentioned here?

I'm working on that now.

>> With the last mysql upgrade, did you restart the service? It's quite
>> important to always restart any service you have just upgraded.

I had restarted the service.

>> > [ERROR] mysql.user has no `Event_priv` column at position 29
>> > [ERROR] Cannot open mysql.event
>> > [ERROR] Event Scheduler: An error occurred when initializing system
>> > tables. Disabling the Event Scheduler.
>> > [Note] /usr/sbin/mysqld: ready for connections.
>> >
>> > It looks like I should run mysql_upgrade for one thing.  Is there a
>> > Gentoo way to do that?  Will I lose data?
>> >
>> > As I went over this I realized that I hadn't enabled skip-networking,
>> > although nmap from the same system didn't show port 3306 open and I'm
>> > not running a firewall on the machine.  How could that be?
>
> There was a recent mysql update which broke some of my mysql databases.  I
> then discovered that I had to run:
>
> $ mysql_upgrade -u root -p
>
> for things to work normally again.  There was no enotice to this effect so I
> raised a bug and since then the devs kindly added a message to the ebuild.
>
> So, to reiterate what Alan said, your crashes are not normal, you need to run
> mysql_upgrade and restart the service with your eye on the logs to see if
> something is amiss.
>
> BTW, if your box is Internet facing, or you do not absolutely trust your LAN
> devices, I would recommend that you run some rudimentary iptables rules to
> keep things safe(r).

Thanks, will do now.

- Grant

Reply via email to