SQL Create query problem php my admin
This is the Create query that i am executing.
开发者_JAVA技巧-- -----------------------------------------------------
-- Table `getv`.`group`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `getv`.`group` (
`id` INT NOT NULL ,
`first_name` VARCHAR(45) NULL DEFAULT NULL ,
`last_name` VARCHAR(45) NULL DEFAULT NULL ,
`company_name` VARCHAR(45) NULL DEFAULT NULL ,
`job_title` VARCHAR(45) NULL DEFAULT NULL ,
`country` VARCHAR(45) NULL DEFAULT NULL ,
`city` VARCHAR(45) NULL DEFAULT NULL ,
`phone` VARCHAR(45) NULL DEFAULT NULL ,
`email` VARCHAR(45) NULL DEFAULT NULL ,
`fax` VARCHAR(45) NULL DEFAULT NULL ,
`number_of_user` INT NULL DEFAULT NULL ,
`group_admin_id` INT NULL DEFAULT NULL ,
PRIMARY KEY (`id`) ,
INDEX `fk_Groups_Country1` (`country` ASC) ,
INDEX `fk_Groups_City1` (`city` ASC) ,
INDEX `fk_Groups_Users1` (`group_admin_id` ASC) ,
CONSTRAINT `fk_Groups_Country1`
FOREIGN KEY (`country` )
REFERENCES `getv`.`country` (`id` )
ON DELETE NO ACTION
ON UPDATE NO ACTION,
CONSTRAINT `fk_Groups_City1`
FOREIGN KEY (`city` )
REFERENCES `getv`.`city` (`id` )
ON DELETE NO ACTION
ON UPDATE NO ACTION,
CONSTRAINT `fk_Groups_Users1`
FOREIGN KEY (`group_admin_id` )
REFERENCES `getv`.`user` (`id` )
ON DELETE NO ACTION
ON UPDATE NO ACTION)
ENGINE = InnoDB
DEFAULT CHARACTER SET = utf8
COLLATE = utf8_unicode_ci;
this is the error that i am getting.please help:
SQL query:
CREATE TABLE IF NOT EXISTS `getv`.`group` ( `id` INT NOT NULL , `first_name` VARCHAR(45) NULL DEFAULT NULL , `last_name` VARCHAR(45) NULL DEFAULT NULL , `company_name` VARCHAR(45) NULL DEFAULT NULL , `job_title` VARCHAR(45) NULL DEFAULT NULL , `country` VARCHAR(45) NULL DEFAULT NULL , `city` VARCHAR(45) NULL DEFAULT NULL , `phone` VARCHAR(45) NULL DEFAULT NULL , `email` VARCHAR(45) NULL DEFAULT NULL , `fax` VARCHAR(45) NULL DEFAULT NULL , `number_of_user` INT NULL DEFAULT NULL , `group_admin_id` INT NULL DEFAULT NULL , PRIMARY KEY (`id`) , INDEX `fk_Groups_Country1` (`country` ASC) , INDEX `fk_Groups_City1` (`city` ASC) , INDEX `fk_Groups_Users1` (`group_admin_id` ASC) , CONSTRAINT `fk_Groups_Country1` FOREIGN KEY (`country` ) REFERENCES `getv`.`country` (`id` ) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fk_Groups_City1` FOREIGN KEY (`city` ) REFERENCES `getv`.`city` (`id` ) ON DELETE [...]
MySQL said: Documentation
#1005 - Can't create table './getv/group.frm' (errno: 150)
and all the other tables is already formed
It seems to me that this is a problem with disk access. The mysql daemon can't create a file on your harddrive. This is not related to the SQL itself.
Check the rights of the user running mysqld
, space left on the hdd, etc.
精彩评论