1 |
On Wednesday 15 Oct 2014 02:14:37 Kerin Millar wrote: |
2 |
> On 14/10/2014 23:25, Mick wrote: |
3 |
> > On Tuesday 14 Oct 2014 21:15:48 Kerin Millar wrote: |
4 |
|
5 |
> >> * Have you upgraded MySQL recently without going through the |
6 |
> >> documented upgrade procedure? [1] |
7 |
> > |
8 |
> > I'm still on mysql-5.5.39 |
9 |
> |
10 |
> OK. If it has always been running MySQL 5.5, there's nothing to be |
11 |
> concerned about. |
12 |
|
13 |
No, sorry I wasn't clear. I have been upgrading mysql on this machine for |
14 |
some years now, always running stable versions. After each update I run: |
15 |
|
16 |
mysql_upgrade -h localhost -u root -p |
17 |
|
18 |
|
19 |
> >> * Have you otherwise removed or modified files in the data |
20 |
> >> directory? |
21 |
> > |
22 |
> > Not as far as I know. I have suspicions of fs corruption though (it's |
23 |
> > been running out of space lately and I haven't yet found out why). |
24 |
> |
25 |
> Not good. Which filesystem, if I may ask? XFS is preferable, due to its |
26 |
> very good performance with O_DIRECT, which ext4 coming in second. Other |
27 |
> filesystems may be problematic. In particular, ZFS does not support |
28 |
> asynchronous I/O. |
29 |
|
30 |
ext4 |
31 |
|
32 |
|
33 |
> In any case, go into /var/lib/mysql and check whether the file that it |
34 |
> mentions exists. If it does not exist, try running: |
35 |
> |
36 |
> DROP TABLE `website1@002dnew`.`webform_validation_rule_components` |
37 |
> |
38 |
> If that does not work then try again, using DISCARD TABLESPACE as |
39 |
> opposed to DROP TABLE. Note that the backtick quoting is necessary |
40 |
> because of the presence of the @ symbol in the database name, which |
41 |
> would otherwise be misinterpreted. |
42 |
|
43 |
Hmm ... I'm probably not doing this right. |
44 |
|
45 |
First of all, there is no local database /var/lib/mysql/website1, because this |
46 |
is the live website name, on the shared server. I only have |
47 |
/var/lib/mysql/website_test on the local dev machine. |
48 |
|
49 |
Then although I can see, e.g. |
50 |
|
51 |
-rw-rw---- 1 mysql mysql 8939 Oct 14 19:25 actions.frm |
52 |
-rw-rw---- 1 mysql mysql 98304 Oct 14 19:25 actions.ibd |
53 |
|
54 |
in /var/lib/mysql/website_test, if I try to run DROP TABlE, logged in as |
55 |
(mysql) root, I get an unknown table, error 1051. |
56 |
|
57 |
========================= |
58 |
mysql> USE website_test; |
59 |
Reading table information for completion of table and column names |
60 |
You can turn off this feature to get a quicker startup with -A |
61 |
|
62 |
Database changed |
63 |
mysql> DROP TABLE `website1@002dnew`.`actions`; |
64 |
ERROR 1051 (42S02): Unknown table 'actions' |
65 |
mysql> DISCARD TABLESPACE `website1@002dnew`.`actions`; |
66 |
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual |
67 |
that corresponds to your MySQL server version for the right syntax to use near |
68 |
'DISCARD TABLESPACE `website1@002dnew`.`actions`' at line 1 |
69 |
========================= |
70 |
|
71 |
I think in mysql-5.5 I should be using DROP TABLESPACE instead? |
72 |
|
73 |
PS. This is the only database I have problems with. There are another dozen |
74 |
or so which I have imported in a similar fashion and there are no errors in |
75 |
the logs about them. |
76 |
-- |
77 |
Regards, |
78 |
Mick |