Re: Can not add foreign key constraint

2017-04-28 Thread David Mehler
27;ll need to add one on user, as was specified in the > create table you originally posted. > > On 28 April 2017 01:21:39 CEST, David Mehler wrote: >>Hello, >> >> Here's the output of the command show create table

Re: Can not add foreign key constraint

2017-04-27 Thread David Mehler
sman wrote: >> >> I note that the innodb status says it couldn't find an index on the >> referenced column. Did the create statements come from your create >> scripts >> or from a show create table statement? I'm suspicious about the index on >> virtual_use

Re: Can not add foreign key constraint

2017-04-25 Thread David Mehler
Hello, Tried recreating the virtual_users table didn't solve anything. Would it be possible for anyone to check out my box directly? Thanks. Dave. On 4/24/17, Peter Brawley wrote: > On 4/24/2017 20:47, David Mehler wrote: >> Hello, >> >> Thanks. Here&#

Re: Can not add foreign key constraint

2017-04-24 Thread David Mehler
ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`user`), FOREIGN KEY (`user`) REFERENCES virtual_users(`user`) ON DELETE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8; Thanks. Dave. On 4/24/17, Peter Brawley wrote: > On 4/24/2017 18:16, David Mehler wrote: >> Hello, >> >> I'm running Mysq

Re: Can not add foreign key constraint

2017-04-24 Thread David Mehler
Hello, I'm running Mysql 5.7.18. My virtual_users are working fine, it's the new table that isn't. Or am I missing something? Thanks. Dave. On 4/24/17, Peter Brawley wrote: > On 4/24/2017 17:41, David Mehler wrote: >> Hello, >> >> Here's the outp

Re: Can not add foreign key constraint

2017-04-24 Thread David Mehler
; your Create texts. > > Ah, an error cascade, as Shawn Green noticed, there's a typo in my > suggested command, should be ... > > show engine innodb status; > > PB > > - > >> >> PB >> >> - >> >>> >>

Re: Can not add foreign key constraint

2017-04-24 Thread David Mehler
On 4/24/17, Peter Brawley wrote: > On 4/24/2017 13:59, David Mehler wrote: >> Hello, >> >> root@localhost [mail]> show engine innodb_status; >> ERROR 1286 (42000): Unknown storage engine 'innodb_status' > > Well it's very unlikely InnoDB m

Re: Can not add foreign key constraint

2017-04-24 Thread David Mehler
Hello, root@localhost [mail]> show engine innodb_status; ERROR 1286 (42000): Unknown storage engine 'innodb_status' This is on a Mysql 5.7 setup. Thanks. Dave. On 4/24/17, Peter Brawley wrote: > On 4/24/2017 12:28, David Mehler wrote: >> Hello, >> >>

Re: Can not add foreign key constraint

2017-04-24 Thread David Mehler
Hello, Here's the create table sand error message. root@localhost [(none)]> use mail; Database changed root@localhost [mail]> CREATE TABLE IF NOT EXISTS `lastauth` ( -> `user` varchar(40) NOT NULL, -> `remote_ip` varchar(18) NOT NULL, -> `timestamp` timestamp NOT NULL DE

Can not add foreign key constraints

2017-04-24 Thread David Mehler
Hello, I'm trying to add a table to an existing database. I'm wanting it to get one of it's fields from an already existing table. I've done this before in this database. This works: CREATE TABLE `virtual_users` ( `id` int(11) NOT NULL auto_increment, `domain_id` int(11) NOT NULL, `u