1 |
On Wednesday 15 Oct 2014 13:41:03 Kerin Millar wrote: |
2 |
|
3 |
|
4 |
> > Database changed |
5 |
> > mysql> DROP TABLE `website1@002dnew`.`actions`; |
6 |
> |
7 |
> Is this a table for which it is also complaining that a corresponding |
8 |
> tablespace doesn't exist in database `website1@@002dnew`? Your original |
9 |
> post mentioned only a table named `webform_validation_rule_components`. |
10 |
|
11 |
Yes, there are loads of tables that it is complaining about. However, the |
12 |
name of the database mentioned in the logs is not that of the local machine, |
13 |
but of the remote. |
14 |
|
15 |
|
16 |
> Whichever table(s) it is complaining about, if you happen to find a |
17 |
> corresponding .idb file in a different database (sub-directory), you |
18 |
> might be able to satisfy MySQL by copying it to where it is expecting to |
19 |
> find it. If that works, you should then be able to drop it. |
20 |
|
21 |
I lost you here. We have the local database, website_test. In it I can see a |
22 |
number of tables. I also have other databases for different websites. Where |
23 |
am I supposed to look for corresponding .idb files? |
24 |
|
25 |
|
26 |
> Sometimes, directly copying an InnoDB tablespace into place requires a |
27 |
> more elaborate procedure but I won't muddy the waters by describing said |
28 |
> procedure just yet. |
29 |
> |
30 |
> > ERROR 1051 (42S02): Unknown table 'actions' |
31 |
> > mysql> DISCARD TABLESPACE `website1@002dnew`.`actions`; |
32 |
> > ERROR 1064 (42000): You have an error in your SQL syntax; check the |
33 |
> > manual that corresponds to your MySQL server version for the right |
34 |
> > syntax to use near 'DISCARD TABLESPACE `website1@002dnew`.`actions`' at |
35 |
> > line 1 |
36 |
> > ========================= |
37 |
> > |
38 |
> > I think in mysql-5.5 I should be using DROP TABLESPACE instead? |
39 |
> |
40 |
> My mistake. The correct syntax for discarding the tablespace would be: |
41 |
> |
42 |
> ALTER TABLE <table> DISCARD TABLESPACE; |
43 |
> |
44 |
> I'm stating the obvious here, but be sure not to DROP or DISCARD |
45 |
> TABLESPACE on a table whose tablespace does exist and for which you do |
46 |
> not have a backup. Both commands are destructive. |
47 |
|
48 |
Well, I still have the backup from the live website, I can restore from it if |
49 |
I have to. However, what I find confusing is that the errors mention the live |
50 |
website's database name, not the local database. Shouldn't the import |
51 |
function import the tables into the local database? |
52 |
-- |
53 |
Regards, |
54 |
Mick |