SQL创建查询问题php我的管理员

时间:2011-03-09 15:22:55

标签: sql phpmyadmin

这是我正在执行的创建查询。

-- -----------------------------------------------------
-- 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;

这是我得到的错误。请帮助:

SQL查询:

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)

并且所有其他表格已经形成

1 个答案:

答案 0 :(得分:0)

在我看来,这是磁盘访问的问题。 mysql守护程序无法在硬盘上创建文件。这与SQL本身无关。

检查运行mysqld的用户的权利,hdd上剩余的空间等。