Message : #1005 - Can't create table './symfonians/application.frm' (errno: 150)

Répondre


Cette question est un moyen d’empêcher des soumissions automatisées de formulaires par des robots.
Smileys
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :!: :?: :idea: :arrow: :| :mrgreen: =D> #-o =P~ :^o :non: :priere: 8-|
Voir plus de smileys
  Revue du sujet
 

  Étendre la vue Revue du sujet : Message : #1005 - Can't create table './symfonians/application.frm' (errno: 150)

par thewind1 » 28 août 2008, 18:58

Ok, merci.

Message :
LATEST FOREIGN KEY ERROR
------------------------
080828 19:20:36 Error in foreign key constraint of table symfonians/application:

FOREIGN KEY (`submitter_id`)
REFERENCES `sf_guard_user` (`id`)
ON DELETE SET NULL
)Type=InnoDB:
You have defined a SET NULL condition though some of the
columns are defined as NOT NULL.

@+

par ouckileou » 28 août 2008, 18:26

C'est peut être via les liens clé primaire/étrangère, les types de champs qui diffèrent d'une table à l'autre ?
C'est fort probable, ils doivent être identiques

par thewind1 » 28 août 2008, 17:47

C'est peut être via les liens clé primaire/étrangère, les types de champs qui diffèrent d'une table à l'autre ?

En tout cas, je vais essayer en mode console la commande : "show innodb status"

Merci ouckileou pour ton lien ;-)

par ouckileou » 28 août 2008, 15:17

ça c'est un problème de contrainte :
Si MySQL vous retourne une numéro d'erreur 1005 lors de la comande CREATE TABLE, et un message d'erreur de numéro 150, alors la création de la table a échoué à cause de la contrainte de clé étrangère, qui n'a pas été correctement formulée.
http://dev.mysql.com/doc/refman/5.0/fr/ ... aints.html

Pour aller plus vite et ne pas farfouiller dans les logs, tu peux taper "show innodb status", le message d'erreur contenu est plus explicite.

par thewind1 » 28 août 2008, 14:09

Voici ce qu'il y a dans :

Code : Tout sélectionner

/var/log/mysql/mysql-bin.000085 /var/log/mysql/mysql-bin.000086 /var/log/mysql/mysql-bin.000087 /var/log/mysql/mysql-bin.000088 /var/log/mysql/mysql-bin.000089 /var/log/mysql/mysql-bin.000090 /var/log/mysql/mysql-bin.000091 /var/log/mysql/mysql-bin.000092 /var/log/mysql/mysql-bin.000093 /var/log/mysql/mysql-bin.000094 /var/log/mysql/mysql-bin.000095 /var/log/mysql/mysql-bin.000096 /var/log/mysql/mysql-bin.000097 /var/log/mysql/mysql-bin.000098 /var/log/mysql/mysql-bin.000099 /var/log/mysql/mysql-bin.000100 /var/log/mysql/mysql-bin.000101 /var/log/mysql/mysql-bin.000102 /var/log/mysql/mysql-bin.000103 /var/log/mysql/mysql-bin.000104 /var/log/mysql/mysql-bin.000105 /var/log/mysql/mysql-bin.000106 /var/log/mysql/mysql-bin.000107

par momox » 28 août 2008, 13:25

Le my.cnf est le fichier de configuration de mysql, dedans le chemin du log de mysql est renseigné ce qui permettra de retrouver ledit fichier log.

par thewind1 » 28 août 2008, 13:16

je vais t'envoyer le résultat de ma commande.
Mais comment envoyer un fichier, stp ?

Parcontre, je ne comprends pas ce que tu veux dire par : my.cnf... ?

[/url]

par Sékiltoyai » 28 août 2008, 09:37

Poste ton my.cnf…

par thewind1 » 28 août 2008, 01:59

non, je ne vois pas .log

par Sékiltoyai » 28 août 2008, 01:45

Tu n'as pas de .log ?

par thewind1 » 28 août 2008, 01:33

J'ai plein de fichiers numérotés : mysql-bin.000085 à mysql-bin.000107 et un mysql-bin.index

Quels informations regardées ?

par Sékiltoyai » 28 août 2008, 01:00

Regarde le log mysql (/var/log/mysql/* sous Unix)…

Message : #1005 - Can't create table './symfonians/applicati

par thewind1 » 28 août 2008, 00:07

Bonjour,
J'ai un souci sur cette base.
En copiant/collant ma base sql sur phpmyadmin, il m'informe qu'il y a un souci sur la requète "application", surement un problème de lien clé primaire/secondaire !???

Message : #1005 - Can't create table './symfonians/application.frm' (errno: 150)

Ma base :

Code : Tout sélectionner

# This is a fix for InnoDB in MySQL >= 4.1.x # It "suspends judgement" for fkey relationships until are tables are set. SET FOREIGN_KEY_CHECKS = 0; #----------------------------------------------------------------------------- #-- activation #----------------------------------------------------------------------------- DROP TABLE IF EXISTS `activation`; CREATE TABLE `activation` ( `id` INTEGER NOT NULL AUTO_INCREMENT, `user_id` INTEGER NOT NULL, `hash` VARCHAR(32) NOT NULL, PRIMARY KEY (`id`), KEY `activation_hash_index`(`hash`), KEY `user_hash`(`user_id`, `hash`), CONSTRAINT `activation_FK_1` FOREIGN KEY (`user_id`) REFERENCES `sf_guard_user` (`id`) )Type=InnoDB; #----------------------------------------------------------------------------- #-- application #----------------------------------------------------------------------------- DROP TABLE IF EXISTS `application`; CREATE TABLE `application` ( `id` INTEGER NOT NULL AUTO_INCREMENT, `submitter_id` INTEGER NOT NULL, `name` VARCHAR(255) NOT NULL, `slug` VARCHAR(255) NOT NULL, `description` TEXT, `homepage` VARCHAR(255), `feed_url` VARCHAR(255), `screenshot_path` VARCHAR(150), `is_opensource` INTEGER default 0, `licence` VARCHAR(30), `country` VARCHAR(2), `is_featured` INTEGER default 0, `started_at` DATETIME, `released_at` DATETIME, `created_at` DATETIME, `updated_at` DATETIME, PRIMARY KEY (`id`), KEY `application_slug_index`(`slug`), KEY `application_is_opensource_index`(`is_opensource`), KEY `application_country_index`(`country`), KEY `application_is_featured_index`(`is_featured`), KEY `application_created_at_index`(`created_at`), KEY `filter_index`(`country`, `created_at`, `is_featured`), INDEX `application_FI_1` (`submitter_id`), CONSTRAINT `application_FK_1` FOREIGN KEY (`submitter_id`) REFERENCES `sf_guard_user` (`id`) ON DELETE SET NULL )Type=InnoDB; #----------------------------------------------------------------------------- #-- application_company #----------------------------------------------------------------------------- DROP TABLE IF EXISTS `application_company`; CREATE TABLE `application_company` ( `id` INTEGER NOT NULL AUTO_INCREMENT, `company_id` INTEGER NOT NULL, `application_id` INTEGER NOT NULL, `submitter_id` INTEGER NOT NULL, `role` VARCHAR(255), `description` TEXT, `started_at` DATETIME, `ended_at` DATETIME, `created_at` DATETIME, `updated_at` DATETIME, PRIMARY KEY (`id`), KEY `application_company_started_at_index`(`started_at`), KEY `application_company_ended_at_index`(`ended_at`), KEY `application_company_created_at_index`(`created_at`), KEY `application_company_updated_at_index`(`updated_at`), INDEX `application_company_FI_1` (`company_id`), CONSTRAINT `application_company_FK_1` FOREIGN KEY (`company_id`) REFERENCES `company` (`id`) ON DELETE CASCADE, INDEX `application_company_FI_2` (`application_id`), CONSTRAINT `application_company_FK_2` FOREIGN KEY (`application_id`) REFERENCES `application` (`id`) ON DELETE CASCADE, INDEX `application_company_FI_3` (`submitter_id`), CONSTRAINT `application_company_FK_3` FOREIGN KEY (`submitter_id`) REFERENCES `sf_guard_user` (`id`) ON DELETE CASCADE )Type=InnoDB; #----------------------------------------------------------------------------- #-- application_developer #----------------------------------------------------------------------------- DROP TABLE IF EXISTS `application_developer`; CREATE TABLE `application_developer` ( `id` INTEGER NOT NULL AUTO_INCREMENT, `developer_id` INTEGER NOT NULL, `application_id` INTEGER NOT NULL, `role` VARCHAR(255), `description` TEXT, `started_at` DATETIME, `ended_at` DATETIME, `created_at` DATETIME, `updated_at` DATETIME, PRIMARY KEY (`id`), KEY `application_developer_started_at_index`(`started_at`), KEY `application_developer_ended_at_index`(`ended_at`), KEY `application_developer_created_at_index`(`created_at`), KEY `application_developer_updated_at_index`(`updated_at`), INDEX `application_developer_FI_1` (`developer_id`), CONSTRAINT `application_developer_FK_1` FOREIGN KEY (`developer_id`) REFERENCES `sf_guard_user` (`id`) ON DELETE CASCADE, INDEX `application_developer_FI_2` (`application_id`), CONSTRAINT `application_developer_FK_2` FOREIGN KEY (`application_id`) REFERENCES `application` (`id`) ON DELETE CASCADE )Type=InnoDB; #----------------------------------------------------------------------------- #-- blog_posts #----------------------------------------------------------------------------- DROP TABLE IF EXISTS `blog_posts`; CREATE TABLE `blog_posts` ( `id` INTEGER NOT NULL AUTO_INCREMENT, `title` VARCHAR(255) NOT NULL, `slug` VARCHAR(255) NOT NULL, `body` TEXT, `author_id` INTEGER NOT NULL, `is_published` INTEGER default 0 NOT NULL, `created_at` DATETIME, `updated_at` DATETIME, PRIMARY KEY (`id`), KEY `blog_posts_is_published_index`(`is_published`), KEY `blog_posts_created_at_index`(`created_at`), KEY `blog_posts_updated_at_index`(`updated_at`), KEY `post_index`(`slug`, `created_at`, `is_published`), INDEX `blog_posts_FI_1` (`author_id`), CONSTRAINT `blog_posts_FK_1` FOREIGN KEY (`author_id`) REFERENCES `sf_guard_user` (`id`) ON DELETE SET NULL )Type=InnoDB; #----------------------------------------------------------------------------- #-- company #----------------------------------------------------------------------------- DROP TABLE IF EXISTS `company`; CREATE TABLE `company` ( `name` VARCHAR(255) NOT NULL, `summary` TEXT, `slug` VARCHAR(255) NOT NULL, `logo_path` VARCHAR(40), `homepage` VARCHAR(255), `address` TEXT, `zip` VARCHAR(10), `city` VARCHAR(50), `state` VARCHAR(50), `country` VARCHAR(2) NOT NULL, `phone` VARCHAR(20), `email` VARCHAR(100), `submitter_id` INTEGER NOT NULL, `allow_contact` INTEGER default 0, `is_active` INTEGER default 1, `created_at` DATETIME, `updated_at` DATETIME, `id` INTEGER NOT NULL AUTO_INCREMENT, PRIMARY KEY (`id`), KEY `company_slug_index`(`slug`), KEY `company_country_index`(`country`), KEY `company_created_at_index`(`created_at`), KEY `filter_index`(`country`, `created_at`), INDEX `company_FI_1` (`submitter_id`), CONSTRAINT `company_FK_1` FOREIGN KEY (`submitter_id`) REFERENCES `sf_guard_user` (`id`) ON DELETE SET NULL )Type=InnoDB; #----------------------------------------------------------------------------- #-- company_people #----------------------------------------------------------------------------- DROP TABLE IF EXISTS `company_people`; CREATE TABLE `company_people` ( `id` INTEGER NOT NULL AUTO_INCREMENT, `user_id` INTEGER NOT NULL, `company_id` INTEGER NOT NULL, `role` VARCHAR(255), `description` TEXT, `started_at` DATETIME, `ended_at` DATETIME, `created_at` DATETIME, `updated_at` DATETIME, PRIMARY KEY (`id`), KEY `company_people_created_at_index`(`created_at`), KEY `company_people_updated_at_index`(`updated_at`), INDEX `company_people_FI_1` (`user_id`), CONSTRAINT `company_people_FK_1` FOREIGN KEY (`user_id`) REFERENCES `sf_guard_user` (`id`) ON DELETE CASCADE, INDEX `company_people_FI_2` (`company_id`), CONSTRAINT `company_people_FK_2` FOREIGN KEY (`company_id`) REFERENCES `company` (`id`) ON DELETE CASCADE )Type=InnoDB; #----------------------------------------------------------------------------- #-- event #----------------------------------------------------------------------------- DROP TABLE IF EXISTS `event`; CREATE TABLE `event` ( `id` INTEGER NOT NULL AUTO_INCREMENT, `type` VARCHAR(255) NOT NULL, `source_model` VARCHAR(25) NOT NULL, `source_name` VARCHAR(255) NOT NULL, `source_slug` VARCHAR(255) NOT NULL, `target_model` VARCHAR(255), `target_name` VARCHAR(255), `target_slug` VARCHAR(255), `occured_at` DATETIME NOT NULL, `is_admin` INTEGER default 0, PRIMARY KEY (`id`), KEY `event_type_index`(`type`), KEY `event_occured_at_index`(`occured_at`), KEY `event_is_admin_index`(`is_admin`), KEY `filter_index`(`source_model`, `source_slug`, `occured_at`, `is_admin`) )Type=InnoDB; #----------------------------------------------------------------------------- #-- jobs #----------------------------------------------------------------------------- DROP TABLE IF EXISTS `jobs`; CREATE TABLE `jobs` ( `id` INTEGER NOT NULL AUTO_INCREMENT, `title` VARCHAR(255) NOT NULL, `slug` VARCHAR(255) NOT NULL, `summary` TEXT NOT NULL, `company_id` INTEGER, `contact_id` INTEGER NOT NULL, `city` VARCHAR(50), `state` VARCHAR(50), `country` VARCHAR(2), `teleworking` INTEGER default 0, `expires_at` DATETIME, `created_at` DATETIME, `updated_at` DATETIME, `budget` VARCHAR(255), PRIMARY KEY (`id`), KEY `jobs_title_index`(`title`), KEY `jobs_slug_index`(`slug`), KEY `jobs_country_index`(`country`), KEY `jobs_teleworking_index`(`teleworking`), KEY `jobs_expires_at_index`(`expires_at`), KEY `jobs_created_at_index`(`created_at`), KEY `filter_index`(`created_at`, `country`), INDEX `jobs_FI_1` (`company_id`), CONSTRAINT `jobs_FK_1` FOREIGN KEY (`company_id`) REFERENCES `company` (`id`) ON DELETE CASCADE, INDEX `jobs_FI_2` (`contact_id`), CONSTRAINT `jobs_FK_2` FOREIGN KEY (`contact_id`) REFERENCES `sf_guard_user` (`id`) ON DELETE CASCADE )Type=InnoDB; #----------------------------------------------------------------------------- #-- recommendation #----------------------------------------------------------------------------- DROP TABLE IF EXISTS `recommendation`; CREATE TABLE `recommendation` ( `id` INTEGER NOT NULL AUTO_INCREMENT, `recommender_id` INTEGER NOT NULL, `recommended_id` INTEGER NOT NULL, `content` TEXT, `created_at` DATETIME, `updated_at` DATETIME, PRIMARY KEY (`id`), KEY `recommendation_created_at_index`(`created_at`), KEY `recommendation_updated_at_index`(`updated_at`), KEY `filter_index`(`recommender_id`, `recommended_id`, `created_at`), CONSTRAINT `recommendation_FK_1` FOREIGN KEY (`recommender_id`) REFERENCES `sf_guard_user` (`id`) ON DELETE CASCADE, INDEX `recommendation_FI_2` (`recommended_id`), CONSTRAINT `recommendation_FK_2` FOREIGN KEY (`recommended_id`) REFERENCES `sf_guard_user` (`id`) ON DELETE CASCADE )Type=InnoDB; # This restores the fkey checks, after having unset them earlier SET FOREIGN_KEY_CHECKS = 1;

MERCI A VOUS.