Log in

View Full Version : Error when trying to restore my database


kurtmorrison
03-13-2008, 04:34 PM
i'm getting this error code:

#1005 - Can't create table './*******_vbulletin/boxmail.frm' (errno: 150)

And this is the SQL consult:

CREATE TABLE `boxmail` (
`id_mail` int( 6 ) NOT NULL AUTO_INCREMENT ,
`id_group` int( 4 ) NOT NULL default '0',
`mail` varchar( 50 ) NOT NULL default '',
PRIMARY KEY ( `id_mail` ) ,
UNIQUE KEY `mail` ( `mail` ) ,
KEY `id_group` ( `id_group` ) ,
CONSTRAINT `boxmail_ibfk_1` FOREIGN KEY ( `id_group` ) REFERENCES `groupfull` ( `id_group` ) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE = InnoDB DEFAULT CHARSET = latin1;

WTF is happening? can you help me

snakes1100
03-13-2008, 04:36 PM
Post the full error

kurtmorrison
03-13-2008, 04:42 PM
Here it's an image of what i'm getting

https://vborg.vbsupport.ru/external/2008/03/42.jpg

I used to have the hosting on 3ix.com (very bad one) and i'm uploading it to Hostmonster.com, i have already restores a few tables, but this one is give me error.

snakes1100
03-13-2008, 04:49 PM
Try removing the key's, then run it again.

kurtmorrison
03-13-2008, 04:50 PM
i'm a newby on this things, do i need just to delete the line about the keys, or just the phrase:

FOREIGN KEY ( `id_group` )

thanks

snakes1100
03-13-2008, 05:42 PM
Yes, try removing just the foreign key and run it again, if it dont work go key by key.

Marco van Herwaarden
03-13-2008, 05:46 PM
MySQL error code 150: Foreign key constraint is incorrectly formed

This is not a vBulletin table, vBulletin doesn't use any foreign key constraints.

Are you restoring to the same MySQL version as the backup was made on? If not, what are the versions?

Most likely cause is that this is a foreign key constraint and the foreign table (groupfull) has not been restored yet, so the constraint can not be created.

kurtmorrison
03-13-2008, 05:53 PM
i used to work with an older version of php, and the database that i'm uploading is generated by vbulletin, on the older server.

so, can i erase the table then?

Marco van Herwaarden
03-13-2008, 05:56 PM
PHP version is not relevant. MySQL versions are.

I don't know if you can drop the table, it is not a vBulletin table, looks like something to do with a mail application.

Also how was the backup create?

kurtmorrison
03-13-2008, 05:59 PM
Yeah sorry, i mean the sql also was the older one

it was created by the asistant of the vbulletin admincp backup

can i have your personal email so i can have more help from you?

Marco van Herwaarden
03-13-2008, 06:33 PM
Do you still have access to the old server, if so please give the exact MySQL versions old the new and old server. Also do you have shell access on both servers and is there a control panel (like cPanel) installed on these servers?

PS No i don't give out my email.

kurtmorrison
03-13-2008, 07:59 PM
Hey, i could fix the problem manually, i had to copy/paste more than 20mb of info jajaja my pc was about to die xD

now i just have a problem with dinamic url, i'll fix that soon, thank you all!