15 messages in com.mysql.lists.mysqlRE: need help with foreign keys, new ...| From | Sent On | Attachments |
|---|---|---|
| John Gonzales | 19 Aug 2005 19:08 | |
| Kishore Jalleda | 19 Aug 2005 20:34 | |
| John Gonzales | 20 Aug 2005 00:10 | |
| Jasper Bryant-Greene | 20 Aug 2005 00:17 | |
| John Gonzales | 20 Aug 2005 00:46 | |
| Thurgood Alex | 20 Aug 2005 01:21 | |
| John Gonzales | 20 Aug 2005 09:28 | |
| Michael Stassen | 20 Aug 2005 21:06 | |
| Michael Stassen | 20 Aug 2005 21:10 | |
| John Gonzales | 24 Aug 2005 04:10 | |
| Pat Adams | 24 Aug 2005 06:17 | |
| Roger Baklund | 24 Aug 2005 07:16 | |
| John Gonzales | 24 Aug 2005 09:00 | |
| Enrique Sanchez Vela | 18 Oct 2005 03:11 | |
| Enrique Sanchez Vela | 18 Oct 2005 03:12 |
| Subject: | RE: need help with foreign keys, new to mysql![]() |
|---|---|
| From: | John Gonzales (john...@shaw.ca) |
| Date: | 08/20/2005 12:46:31 AM |
| List: | com.mysql.lists.mysql |
honestly... i don't even know. =( i'm new to mysql... how would i check?
-jg
-----Original Message----- From: Jasper Bryant-Greene [mailto:jas...@bryant-greene.name] Sent: August 20, 2005 2:18 AM To: mys...@lists.mysql.com Subject: Re: need help with foreign keys, new to mysql
Yes but is the MySQL daemon running as root? I hope it isn't...
Jasper
John Gonzales wrote:
i am logged in as root
-JG.
-----Original Message----- From: Kishore Jalleda [mailto:kjal...@gmail.com] Sent: August 19, 2005 10:35 PM To: John Gonzales Cc: mys...@lists.mysql.com Subject: Re: need help with foreign keys, new to mysql
check the permissions on the mysql data dir, may be the user mysql or who ever runs mysql does not have sufficient privileges Kishore Jalleda
On 8/19/05, John Gonzales <john...@shaw.ca> wrote:
i am creating my own little blog and i am trying to create a comments
table
that uses the primary key of my blog table as a foreign key. i've tried
the
only two ways that i know how and both ways yielded the same error:
#1005 - Can't create table '.\mydatabase\comments.frm' (errno: 150)
i orginally created the comments table before i read about FOREIGN KEYS,
so
i tried executing the following command:
ALTER TABLE comments ADD FOREIGN KEY(comment_journal_id) REFERENCES journal(journal_id) ON DELETE CASCADE ON UPDATE CASCADE;
which resulted with the same error as listed above. so not really knowing what i was doing, i decided to try and create the comments table from scratch using the following the command thinking that it might work (which it didn't):
CREATE TABLE comments( comment_id INT, journal_id INT, INDEX jrn_ind( journal_id ) , FOREIGN KEY ( journal_id ) REFERENCES journal( journal_id ) ON DELETE CASCADE ON UPDATE CASCADE ) TYPE = INNODB
now before i go and do something stupid, i thought i might ask for some
help
on this issue :D both my blog and comments tables are InnoDB.
-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/mysql?unsub=kjal...@gmail.com
-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/mysql?unsub=john...@shaw.ca




