Gentoo Archives: gentoo-user

From: Grant <emailgrant@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Should mysql crash sometimes?
Date: Sun, 28 Nov 2010 20:21:16
Message-Id: AANLkTi=nL4OYN4dwz9s6Fw4Xkp5z8Mc4s6fmPDeGcQ_e@mail.gmail.com
In Reply to: Re: [gentoo-user] Should mysql crash sometimes? by Mick
1 >> > mysql-5.1.51 crashed recently and needed to be restarted.  This
2 >> > doesn't happen often with mysql but does from time to time.  Is this
3 >> > part of life with mysql or can it be prevented?
4 >>
5 >> This is not normal. None of my mysql instances crash frequently
6
7 Mine doesn't crash frequently. Maybe once every 6 months, but I'd
8 prefer it didn't crash at all.
9
10 >> > I don't think I've
11 >> > changed the mysql config from default besides creating the necessary
12 >> > tables although I could be wrong.  /var/log/mysql/mysqld.err doesn't
13 >> > contain info about the crash but here's info from the restart:
14 >> >
15 >> > [Warning] No argument was provided to --log-bin, and --log-bin-index
16 >> > was not used; so replication may break when this MySQL server acts as
17 >> > a master and has his hostname changed!! Please use
18 >> > '--log-bin=mysqld-bin' to avoid this problem. /usr/sbin/mysqld: Table
19 >> > 'mysql.plugin' doesn't exist
20 >> > [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to
21 >> > create it.
22 >> > InnoDB: Started; log sequence number 0 43655
23 >> > [Note] Recovering after a crash using mysqld-bin
24 >> > [Note] Starting crash recovery...
25 >> > [Note] Crash recovery finished.
26 >> > [ERROR] Can't open and lock privilege tables: Table 'mysql.servers'
27 >> > doesn't exist
28 >> > [ERROR] Column count of mysql.db is wrong. Expected 22, found 20.
29 >> > Created with MySQL 50070, now running 50151. Please use mysql_upgrade
30 >> > to fix this error.
31 >>
32 >> Did you ever run mysql_upgrade as mentioned here?
33
34 I'm working on that now.
35
36 >> With the last mysql upgrade, did you restart the service? It's quite
37 >> important to always restart any service you have just upgraded.
38
39 I had restarted the service.
40
41 >> > [ERROR] mysql.user has no `Event_priv` column at position 29
42 >> > [ERROR] Cannot open mysql.event
43 >> > [ERROR] Event Scheduler: An error occurred when initializing system
44 >> > tables. Disabling the Event Scheduler.
45 >> > [Note] /usr/sbin/mysqld: ready for connections.
46 >> >
47 >> > It looks like I should run mysql_upgrade for one thing.  Is there a
48 >> > Gentoo way to do that?  Will I lose data?
49 >> >
50 >> > As I went over this I realized that I hadn't enabled skip-networking,
51 >> > although nmap from the same system didn't show port 3306 open and I'm
52 >> > not running a firewall on the machine.  How could that be?
53 >
54 > There was a recent mysql update which broke some of my mysql databases.  I
55 > then discovered that I had to run:
56 >
57 > $ mysql_upgrade -u root -p
58 >
59 > for things to work normally again.  There was no enotice to this effect so I
60 > raised a bug and since then the devs kindly added a message to the ebuild.
61 >
62 > So, to reiterate what Alan said, your crashes are not normal, you need to run
63 > mysql_upgrade and restart the service with your eye on the logs to see if
64 > something is amiss.
65 >
66 > BTW, if your box is Internet facing, or you do not absolutely trust your LAN
67 > devices, I would recommend that you run some rudimentary iptables rules to
68 > keep things safe(r).
69
70 Thanks, will do now.
71
72 - Grant