syntax error - mySQL corruption "Cannot add foreign key constraint" trying to CREATE table -
syntax error - mySQL corruption "Cannot add foreign key constraint" trying to CREATE table -
edit corrupt mysql db problem. pls see "edit:" below
trying add together table called client new mysql db:
create table `client` ( `id` int not null auto_increment, `person_id` int not null default '0', primary key (`id`) ) collate='latin1_swedish_ci' engine=innodb;
every time get: #1215 - cannot add together foreign key constraint
.
i have looked @ reserved word lists can find. none of them seem have "client".
i can utilize "clients" (but not having table plurals -0 others singular), "clientxxx" etc. want utilize "client". there way round this? of import clients not patients.
ps have deleted other tables db still not fly.
pps although not listed client
is ****** reserved word in sql in reality (or @ to the lowest degree heidisql lists it. there way around it? (i think know reply one). , why heck not in mysql reserved words list?
edit: ok dropped old db. tried db called testxxx , worked fine. tried rename db old name = betadb01 , got:
database "betadb01" exists. not contain objects same names in "testxxx", it's uncritical move everything. move objects "betadb01"?
... said yes , got sql error (1025) ... errno 150 - foreign key constraint incorrectly formed
i have run repair options in heidisql. looking through repair , analysis logs db in question seen. can pretty rename db , past problem bit nervous making. ideas how can clean out problem? finish reinstall of mysql after exporting other databases???
mysql syntax-error corruption
Comments
Post a Comment