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