Re: Can not add foreign key constraint

2017-04-28 Thread David Mehler
Hello, My thanks to everyone who helped on this issue. The index did it. Thanks. Dave. On 4/28/17, Johan De Meersman wrote: > That is quite different, as I suspected :-) > > Referential keys require an index on the target table that begins with the > referenced field, so you&#x

Re: Can not add foreign key constraint

2017-04-27 Thread Johan De Meersman
That is quite different, as I suspected :-) Referential keys require an index on the target table that begins with the referenced field, so you'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: &

Re: Can not add foreign key constraint

2017-04-27 Thread David Mehler
rs(user). >> >> >> - Original Message - >>> From: "David Mehler" >>> To: "MySql" >>> Sent: Tuesday, 25 April, 2017 23:07:19 >>> Subject: Re: Can not add foreign key constraint >> >>> Hello, >>&g

Re: Can not add foreign key constraint

2017-04-25 Thread David Mehler
;>> >>> PB >>> >>> >>>> Thanks. >>>> Dave. >>>> >>>> >>>> On 4/24/17, Peter Brawley wrote: >>>>> On 4/24/2017 17:41, David Mehler wrote: >>>>>> Hello, >>>

Re: Can not add foreign key constraint

2017-04-24 Thread Peter Brawley
gt; PRIMARY KEY (`user`), -> FOREIGN KEY (user) REFERENCES virtual_users(user) ON DELETE CASCADE -> ) ENGINE=InnoDB DEFAULT CHARSET=utf8; ERROR 1215 (HY000): Cannot add

Re: Can not add foreign key constraint

2017-04-24 Thread David Mehler
LT CURRENT_TIMESTAMP ON >>>> UPDATE CURRENT_TIMESTAMP, >>>&g

Re: Can not add foreign key constraint

2017-04-24 Thread David Mehler
; UPDATE CURRENT_TIMESTAMP, >> -> PRIMARY KEY (`user`), >> -> FOREIGN KEY (user) REFERENCES virtual_users(user) ON DELETE >> CASCADE >> -> ) ENGINE=InnoDB DEFAULT

Re: Can not add foreign key constraint

2017-04-24 Thread David Mehler
-> PRIMARY KEY (`user`), -> FOREIGN KEY (user) REFERENCES virtual_users(user) ON DELETE CASCADE -> ) ENGINE=InnoDB DEFAULT CHARSET=utf8; ERROR 1215 (HY000): Cannot add foreign key constraint root@localhost [mail]&

Re: Can not add foreign key constraint

2017-04-24 Thread Peter Brawley
-> `timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, -> PRIMARY KEY (`user`), -> FOREIGN KEY (user) REFERENCES virtual_users(user) ON DELETE CASCADE -> ) ENGINE=InnoDB DEFAULT CHARSET=utf8; ERROR 1215 (HY000): C

Re: Can not add foreign key constraint

2017-04-24 Thread shawn l.green
On 4/24/2017 2:10 PM, Peter Brawley wrote: On 4/24/2017 12:28, David Mehler wrote: ...snip Adding in a dummy Create Table for the missing referenced `virtual_domains`, we have ... drop table if exists lastauth, virtual_users, virtual_domains; CREATE TABLE virtual_domains ( id int PRIMA

Re: Can not add foreign key constraint

2017-04-24 Thread David Mehler
T EXISTS `lastauth` ( >>>> -> `user` varchar(40) NOT NULL, >>>> -> `remote_ip` varchar(18) NOT NULL, >>>> -> `timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON >>>> UPDATE CURRENT_TIMESTA

Re: Can not add foreign key constraint

2017-04-24 Thread Peter Brawley
ser) ON DELETE CASCADE -> ) ENGINE=InnoDB DEFAULT CHARSET=utf8; ERROR 1215 (HY000): Cannot add foreign key constraint For the table it's referencing here it is: CREATE TABLE `virtual_users` ( `id` int(11) NOT NULL auto_increment, `domain_id` int(11) NO

Re: Can not add foreign key constraint

2017-04-24 Thread David Mehler
; `remote_ip` varchar(18) NOT NULL, >>-> `timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON >>UPDATE CURRENT_TIMESTAMP, >>-> PRIMARY KEY (`user`), >>-> FOREIGN KEY (user) REFERENCES virtual_users(user) ON DELETE >> CASCADE >>

Re: Can not add foreign key constraint

2017-04-24 Thread Peter Brawley
` varchar(18) NOT NULL, -> `timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, -> PRIMARY KEY (`user`), -> FOREIGN KEY (user) REFERENCES virtual_users(user) ON DELETE CASCADE -> ) ENGINE=InnoDB DEFAULT CHARSET=utf8; E

Re: Can not add foreign key constraint

2017-04-24 Thread David Mehler
` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, -> PRIMARY KEY (`user`), -> FOREIGN KEY (user) REFERENCES virtual_users(user) ON DELETE CASCADE -> ) ENGINE=InnoDB DEFAULT CHARSET=utf8; ERROR 1215 (HY000): Cannot add foreign key cons

Re: Can not add foreign key constraints

2017-04-24 Thread Peter Brawley
On 4/24/2017 9:18, David Mehler wrote: 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` ( `

Re: Can not add foreign key constraints

2017-04-24 Thread Reindl Harald
Am 24.04.2017 um 16:18 schrieb David Mehler: 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` ( `

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_

Can not add trigger

2012-11-22 Thread aaronrus
I'm using mysql version 5.1.66 on ubuntu and can not add a trigger any more. When trying to add a trigger In phpmyadmin I get "Your SQL query has been executed successfully" but when I issue the command show triggers; no triggers are listed. Im logged into mysql as root and Im

Re: add index to slave but not master

2011-10-31 Thread Luis Motta Campos
On 31 Oct 2011, at 08:46, Jeff Pang wrote: > Hello, > > I have a question that, if I add the index to the table in slave, but > don't do it in master, will it make problems? Jeff, I manage some big data here and this is my preferred strategy - shard the workload in diff

Re: add index to slave but not master

2011-10-31 Thread Andrew Moore
will differ from the original master and you might notice a performance difference as a result. Hth Andrew On Oct 31, 2011 7:47 AM, "Jeff Pang" wrote: > Hello, > > I have a question that, if I add the index to the table in slave, but > don't do it in master, will i

add index to slave but not master

2011-10-31 Thread Jeff Pang
Hello, I have a question that, if I add the index to the table in slave, but don't do it in master, will it make problems? Thanks. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org

mysql tables are lost for DDL of "alter table .. add column ..."

2011-08-11 Thread hiu
mysql tables are lost for DDL of "alter table .. add column ..." *1. mysqld's error.log* 110803 3:39:16 InnoDB: Warning: problems renaming 'feel_22/#sql-2635_23d3a8' to 'feel_22/feed_send_1451', 25000 iterations (first 25000,fil0fil.c:: fil_rename_tabl

Re: how to RE-add innoDB storage? kinda kludgy fix

2011-03-08 Thread ed
On 03/04/2011 09:24 PM, ed wrote: On 03/04/2011 10:46 AM, Jerry Schwartz wrote: -Original Message- From: ed [mailto:eth...@earthlink.net] [JS] I guess wordwrap is going to mess this up; mysql> show engines ; [JS] Next time, try SHOW ENGINES\G Regards, I see no differences. tha

Re: how to RE-add innoDB storage?

2011-03-04 Thread ed
On 03/04/2011 10:46 AM, Jerry Schwartz wrote: -Original Message- From: ed [mailto:eth...@earthlink.net] [JS] I guess wordwrap is going to mess this up; mysql> show engines ; [JS] Next time, try SHOW ENGINES\G Regards, I see no differences. thanks for the rep

RE: how to RE-add innoDB storage?

2011-03-04 Thread Jerry Schwartz
>-Original Message- >From: ed [mailto:eth...@earthlink.net] [JS] > >I guess wordwrap is going to mess this up; > > >mysql> show engines ; [JS] Next time, try SHOW ENGINES\G Regards, Jerry Schwartz Global Information Incorporated 195 Farmington Ave. Farmington, CT 06032 860.674.8796 /

Re: how to RE-add innoDB storage?

2011-03-04 Thread Joerg Bruehe
which one are you using now? > (if this is not some sort of "catchall" error). I would like to know how > to add innodb plugin back into my mysql, or to convert the data to a > usable format. I would be pleased with a pointer to the correct rtfd > location. >Fr

how to RE-add innoDB storage?

2011-03-04 Thread ed
I have recently noticed I can not access a PHP application's data files, and the errors I am getting seem to show that a recent update of the distro (mandriva) no longer supports innodb, and this may be a reason (if this is not some sort of "catchall" error). I would like to k

Re: CR: add support of interactive transactions for webclients

2011-02-15 Thread Johan De Meersman
I can't speak for the MySQL people, but in my view your "workaround" is the correct way of implementing this. It is not the database's job to keep track of which user wants to keep what session open, and HTTP is stateless by design. Keeping transactions open for relatively long periods of time woul

CR: add support of interactive transactions for webclients

2011-02-14 Thread Herbert Huber
CR: add support of interactive transactions for webclients Hello, I dont know how to place an idea (CR) for mySQL. I try it that way. At the moment I am implementing an "easy-to-use" multiuser webclient for database usage. (phpMyAdmin in contrast is a very powerful tool for p

Re: Unable to add users with MySQL 5.5.8 under Windows

2010-12-16 Thread Shawn Green (MySQL)
urity under the Server Administration heading, choosing the default Local instance: MySQL server to connect to. Next I click Accounts and finally Add Account at the bottom of this screen. Under Details for Account newu...@% I add in the user name I want, type the password twice, I've tried lea

Re: Unable to add users with MySQL 5.5.8 under Windows

2010-12-16 Thread Tim Thorburn
ation heading, choosing the default Local instance: MySQL server to connect to. Next I click Accounts and finally Add Account at the bottom of this screen. Under Details for Account newu...@% I add in the user name I want, type the password twice, I've tried leaving Limit Connectivit

Unable to add users with MySQL 5.5.8 under Windows

2010-12-16 Thread Tim Thorburn
nce: MySQL server to connect to. Next I click Accounts and finally Add Account at the bottom of this screen. Under Details for Account newu...@% I add in the user name I want, type the password twice, I've tried leaving Limit Connectivity to Hosts Matching as % and localhost. Once I&#x

RE: Add "record number" to timestamped router data to facilitate cross join

2010-10-05 Thread Travis Ard
SERT trigger on your stats table so your application wouldn't need to worry about it. -Travis -Original Message- From: Jake Peavy [mailto:djstu...@gmail.com] Sent: Tuesday, October 05, 2010 10:34 AM To: MySQL General Mailing List Subject: Re: Add "record number" to timesta

Re: Add "record number" to timestamped router data to facilitate cross join

2010-10-05 Thread Jake Peavy
| > |1 | 24/08/2010 12:41 | 4| 84 | 82 | > |1 | 24/08/2010 14:58 | 26 | 9| 62 | > |2 | 24/08/2010 14:51 | 36 | 75 | 31 | > +--+--+------+--+--+ > > My plan, t

Add "record number" to timestamped router data to facilitate cross join

2010-10-01 Thread Jake Peavy
| 36 | 75 | 31 | +--+--+--+--+--+ My plan, to facilitate the cross join, was to add a per-device "record number" like follows: +--+--+---+--+--+--+ | route

Re: Add & Arrange New Column

2010-09-17 Thread Jo�o C�ndido de Souza Neto
alter table "mytable" add id int not null primary key auto_increment first; I hope it can help you. -- João Cândido de Souza Neto "Carlos Mennens" escreveu na mensagem news:aanlktikfc89rhercrg5pr9yxfv8semvdv4kp9r67n...@mail.gmail.com... >I have an existing tab

Add & Arrange New Column

2010-09-17 Thread Carlos Mennens
I have an existing table with a few columns I created a few months ago. Sadly I left out the column I would like to use for my Primary Key and wanted to know what is the best way to add a column to an existing table but also I want the column to appear first before any other columns since it'

Re: Altering database size to add more space

2010-06-25 Thread Carsten Pedersen
On Fri, 25 Jun 2010 06:31:11 -0500, Jim Lyons wrote: > I think you're confusing table size with data base size. The original post > grouped by schema so it appears the question concerns database size. I > don't believe mysql imposes any limits on that. Is there a limit on the > number of

Re: Altering database size to add more space

2010-06-25 Thread Jim Lyons
I think you're confusing table size with data base size. The original post grouped by schema so it appears the question concerns database size. I don't believe mysql imposes any limits on that. Is there a limit on the number of tables you can have in a schema imposed by mysql? On Fri, Jun 25,

Re: Altering database size to add more space

2010-06-25 Thread Johan De Meersman
On Fri, Jun 25, 2010 at 7:11 AM, Prabhat Kumar wrote: > In case MyISAM it will grow up to space on your data drive or the Max size > of file limited by OS.. > Not entirely correct. There is some kind of limit to a MyISAM file that has to do with pointer size - I've encountered it several years a

Re: Altering database size to add more space

2010-06-24 Thread Prabhat Kumar
There is 2 way to check databases size : A. OS level, you can do *#du -hs *of data dir , it will show current usages of you database size at File system level. B. You can also check on Database level check details here

Re: Altering database size to add more space

2010-06-24 Thread Jim Lyons
What do you mean "time to increase"? What tells you that? A database's size is determined by the amount of available diskspace. If you need more than the filesystem that it is currently on has, then you can either move the entire schema (which is synonymous to "database") to another filesystem a

Re: Altering database size to add more space

2010-06-24 Thread Ananda Kumar
what is the innodb file size that u have specified in my.cnf. If the last file is autoextend, that this will grow to the size of the disk space avaliable. regards anandkl On Thu, Jun 24, 2010 at 7:43 PM, Sarkis Karayan wrote: > I feel like I am missing something, because I am not able to find t

Altering database size to add more space

2010-06-24 Thread Sarkis Karayan
I feel like I am missing something, because I am not able to find the answer to this simple question. How can I increase the size of a database? I am using the following query to check the available space and notice that it is time to increase. SELECT table_schema AS 'Db Name', Round( Sum( d

RE: how to add foreign key in alter command

2009-05-17 Thread abdulazeez alugo
> Date: Sun, 17 May 2009 14:25:55 +0800 > From: nathan.vorbei.t...@gmail.com > To: mysql@lists.mysql.com > Subject: how to add foreign key in alter command > > Hi guys > Please tell me the command syntax, how to add a colmmen foreign key in > alter syntax > thanks

how to add foreign key in alter command

2009-05-16 Thread Nathan Huang
Hi guys Please tell me the command syntax, how to add a colmmen foreign key in alter syntax thanks -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org

Re: best way to add a new column to a table with 60+ million records

2008-05-25 Thread Ananda Kumar
Also, The below method will not add it the default values for date's and also will create the indexes and if any column is set as auto increment, that also need to be take care. So, is there a way to take care of the above, in the create table statement itself. regards anandkl On 5/

Re: best way to add a new column to a table with 60+ million records

2008-05-25 Thread Moon's Father
Just execute as the following. 1、create table b like a; 2、alter table b add ; 3、insert into b select a. 4、alter table b rename to a; On Wed, Apr 16, 2008 at 11:08 PM, Arun Kumar PG <[EMAIL PROTECTED]> wrote: > given that my table is in myisam, there are some hacky way of d

Re: 5.1.24-rc and partitioning and add, drop partitions and select

2008-05-12 Thread Krishna Chandra Prajapati
gt; > --- Mariella Petrini <[EMAIL PROTECTED]> > wrote: > > > Hi ALL, > > > > > > I have been using 5.1.24-rc and partitioning by > > range. > > > > I have noticed that while doing a set of SELECT > > statements on one of the partitions (e.g

Re: 5.1.24-rc and partitioning and add, drop partitions and select

2008-05-12 Thread Mariella Petrini
> > I have been using 5.1.24-rc and partitioning by > range. > > I have noticed that while doing a set of SELECT > statements on one of the partitions (e.g. p1) and > at > the same time doing an ALTER TABLE with drop or add > a > different partition (e.g. ALT

5.1.24-rc and partitioning and add, drop partitions and select

2008-05-12 Thread Mariella Petrini
Hi ALL, I have been using 5.1.24-rc and partitioning by range. I have noticed that while doing a set of SELECT statements on one of the partitions (e.g. p1) and at the same time doing an ALTER TABLE with drop or add a different partition (e.g. ALTER TABLE DROP or ADD PARTITION p10) all the

Re: best way to add a new column to a table with 60+ million records

2008-04-16 Thread Arun Kumar PG
easy way to do it. On Wed, Apr 16, 2008 at 5:30 PM, Arun Kumar PG <[EMAIL PROTECTED]> wrote: > hi, > > is there any other best way add a new column to an existing table having > 60+ million records. alter is taking more than 1.5 hours.. what are the best > practices around thi

best way to add a new column to a table with 60+ million records

2008-04-16 Thread Arun Kumar PG
hi, is there any other best way add a new column to an existing table having 60+ million records. alter is taking more than 1.5 hours.. what are the best practices around this. quick help will be appreciated. -- cheers, - a

Re: how to add index

2008-02-15 Thread mos
At 07:55 AM 2/15/2008, you wrote: Hi lists, I have innodb tables with millions of records. How can i add index without locking the table. Saravanan Saravanan, I don't see any way of doing it without locking the table. Otherwise as the index is being built, user's would be

how to add index

2008-02-15 Thread Saravanan
Hi lists, I have innodb tables with millions of records. How can i add index without locking the table. Saravanan Never miss a thing. Make Yahoo your home page. http://www.yahoo.com/r/hs -- MySQL

Repair/add spatial index on a spatial column

2008-02-12 Thread Etienne Sandré
Dear all, Is "repair by sort" working for building spatial indexes on spatial columns? I have a table with a spatial column for storing geospatial data. My table is rather big (18M records, 7GB disk space) When I want to add a spatial index "CREATE SPATIAL INDEX geomindex ON arc

Re: I need to add to content somehow

2008-01-03 Thread afan pasalic
cular record can be displayed > in more than one category. > > All I need to do is somehow ask the field to add a forward slash to the > front and end of the data, so the data will go from this: > > 1 > 33 > 21 > 9 > 11 > > to this: > > /1/ > /33/

Re: I need to add to content somehow

2008-01-03 Thread afan pasalic
cular record can be displayed > in more than one category. > > All I need to do is somehow ask the field to add a forward slash to the > front and end of the data, so the data will go from this: > > 1 > 33 > 21 > 9 > 11 > > to this: > > /1/ > /33/

re: I need to add to content somehow

2008-01-03 Thread J.R. Bullington
are trying to update is a VARCHAR, because as it stands, it looks as though you have that field as an INT. J.R. From: Matthew Stuart <[EMAIL PROTECTED]> Sent: Thursday, January 03, 2008 12:55 PM To: MySQL email support Subject: I need to add to c

I need to add to content somehow

2008-01-03 Thread Matthew Stuart
more than one category. All I need to do is somehow ask the field to add a forward slash to the front and end of the data, so the data will go from this: 1 33 21 9 11 to this: /1/ /33/ /21/ /9/ /11/ How do I get MySQL to do this? I guess I might have to do it in two steps by firstly adding

Re: Add a replicated DB w/o rebooting the server

2007-10-31 Thread John Dba
Hi, Master to slave replication. If a database is created in master and in slave config file if i needs to add the 2nd database name to replicate, without restarting the instance in slave it is not possible. Cheers John_mysql - Original Message From: Oriol Capsada <[EM

Re: Add Restricted User

2007-09-27 Thread Robby Tanner
I had not explicitly granted any privileges. Is that just the required default assignment of some kind? Regards, Rob ""Robby Tanner"" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] I want to add a user who can login from anywhere but has restricted privileg

Add Restricted User

2007-09-27 Thread Robby Tanner
I want to add a user who can login from anywhere but has restricted privileges on a single DB. I tried: GRANT SELECT, INSERT, UPDATE ONcaddb.* TO 'autocad'@'%' IDENTIFIED BY 'password'; The query ran and the user was entered with the proper privileges, howe

Re: Add column from another table

2007-06-09 Thread Baron Schwartz
Hi David, David Scott wrote: I would like to add a column to a table where the column to be added is in another table. The column entries are to be matched using a particular column from each table. I have one table detailing phone calls, indexed by CallID. I have created another table

Add column from another table

2007-06-08 Thread David Scott
I would like to add a column to a table where the column to be added is in another table. The column entries are to be matched using a particular column from each table. I have one table detailing phone calls, indexed by CallID. I have created another table with the same index and a column

Re: Find and Add Unmatched Records

2007-06-01 Thread Baron Schwartz
s using(student_id) where keepers.student_id is null; drop table pickThroughThenDelete; -Original Message- From: Baron Schwartz [mailto:[EMAIL PROTECTED] Sent: Friday, June 01, 2007 10:35 AM To: Kebbel, John Cc: mysql@lists.mysql.com Subject: Re: Find and Add Unmatched Records Hi

RE: Find and Add Unmatched Records

2007-06-01 Thread Kebbel, John
ble pickThroughThenDelete; -Original Message- From: Baron Schwartz [mailto:[EMAIL PROTECTED] Sent: Friday, June 01, 2007 10:35 AM To: Kebbel, John Cc: mysql@lists.mysql.com Subject: Re: Find and Add Unmatched Records Hi John, Kebbel, John wrote: > I have a table of middle school students I

Re: Find and Add Unmatched Records

2007-06-01 Thread Baron Schwartz
that would do this, but is there a MySQL way for one MySQL table (preceding quarter) to scan another MySQL table (current quarter) by primary key (student id number) and absorb the unmatched, new students? I'm thinking that if f I could bypass PHP, I could use MySQL triggers to automatical

RE: Find and Add Unmatched Records

2007-06-01 Thread Rhys Campbell
The "REPLACE" staement might work for you... http://dev.mysql.com/doc/refman/4.1/en/replace.html... -Original Message- From: Kebbel, John [mailto:[EMAIL PROTECTED] Sent: 01 June 2007 15:31 To: mysql@lists.mysql.com Subject: Find and Add Unmatched Records I have a table

Find and Add Unmatched Records

2007-06-01 Thread Kebbel, John
ere a MySQL way for one MySQL table (preceding quarter) to scan another MySQL table (current quarter) by primary key (student id number) and absorb the unmatched, new students? I'm thinking that if f I could bypass PHP, I could use MySQL triggers to automatically add new records to other, related tables.

RE: How to get the table.column in mysql client tab completion? Or feature request to add this.

2007-05-25 Thread Daevid Vincent
> Daevid Vincent wrote: > [snip] > > Also, it would be great if mysql client was "smart" enough > to limit my > > tab completion choices to possibilities based upon the > current SQL query > > I'm crafting. So If I have: > > > > "select t[TAB] from ResolveTable join Tickets;" > > > > It shoul

Re: How to get the table.column in mysql client tab completion? Or feature request to add this.

2007-05-25 Thread Baron Schwartz
Hi, Daevid Vincent wrote: [snip] Also, it would be great if mysql client was "smart" enough to limit my tab completion choices to possibilities based upon the current SQL query I'm crafting. So If I have: "select t[TAB] from ResolveTable join Tickets;" It should only show me columns that sta

How to get the table.column in mysql client tab completion? Or feature request to add this.

2007-05-24 Thread Daevid Vincent
Is there a way to get the full table.column always in mysql client when using the auto-tab completion feature? I'm currently using 5.0.36. The way it works now is a bit confusing. Notice I have TWO different "DateOnly" columns (for example) in two different tables. [middle column] mysql> select

Re: Add foreign key

2007-01-09 Thread Mungbeans
And here are the matching drop and create statements: ALTER TABLE `mytable` DROP FOREIGN KEY `fk_mytable_id`; ALTER TABLE `mytable` ADD CONSTRAINT `fk_mytable_id` FOREIGN KEY ( `id` ) REFERENCES `anothertable` ( `id` ) ON UPDATE CASCADE ON DELETE RESTRICT; I don't know what I was

Re: Add foreign key

2007-01-09 Thread Mungbeans
Just found this added the name: ALTER TABLE `mytable` ADD FOREIGN KEY `fk_mytable_id` ( `id` ) REFERENCES `othertable` ( `id` ); I thought I had tried that - obviously not. -- View this message in context: http://www.nabble.com/Add-foreign-key-tf2950373.html#a8251427 Sent from the MySQL

Add foreign key

2007-01-09 Thread Mungbeans
Still on the top of foreign keys :) I have this statement: ALTER TABLE `mytable` ADD FOREIGN KEY ( `id` ) REFERENCES `othertable` ( `id` ); Is there a way I can give this key a specific name (eg 'FK_mytable_id') and specific the type of reference (eg 'ON UPDATE CASCADE

Re: help trying to add an autoincrement col to an exisiting table

2006-11-02 Thread Rolando Edwards
IQUE KEY id (id), KEY dir_users (dir), KEY seminar_users (seminar), KEY user_lvl_idx (level) ); - Original Message - From: Randy Paries <[EMAIL PROTECTED]> To: mysql@lists.mysql.com Sent: Wednesday, November 1, 2006 9:23:55 PM GMT-0500 US/Eastern Subject: help trying to add an autoin

help trying to add an autoincrement col to an exisiting table

2006-11-01 Thread Randy Paries
default '', seminar int(11) NOT NULL default '0', getnewsletter int(11) default '0', PRIMARY KEY (uname), KEY uname_users (uname), KEY dir_users (dir), KEY seminar_users (seminar), KEY user_lvl_idx (level) ) TYPE=MyISAM; I want to add an autoincrement field when i f

Re: Alter Table Add Column - How Long to update

2006-10-22 Thread Ow Mun Heng
On Sun, 2006-10-22 at 21:32 +0800, 黄小聪 wrote: > "it says this is done so that other read processes can still > access the DB/table in it's OLD state w/o any hiccups." > I do not understand > so how does the MSSQL DB work when we alter table add column Frankly, I

Re: Alter Table Add Column - How Long to update

2006-10-22 Thread 黄小聪
"it says this is done so that other read processes can still access the DB/table in it's OLD state w/o any hiccups." I do not understand so how does the MSSQL DB work when we alter table add column* * 2006/10/22, Ow Mun Heng <[EMAIL PROTECTED]>: On Fri, 2006-10-20 at 0

Re: Alter Table Add Column - How Long to update

2006-10-21 Thread Ow Mun Heng
says it's done. > > Is this kind of speed expected? > > > > I don't really understand how the alter table add column is done, but > > when I look at the "show processlist" I see that it says the state is > > "copying into tmp table" > >

Re: Alter Table Add Column - How Long to update

2006-10-20 Thread William R. Mussatto
understand how the alter table add column is done, but > when I look at the "show processlist" I see that it says the state is > "copying into tmp table" > > Does the alter table mean that MySQL has to copy the Entire table, > row-by-row into a temporary table, and a

Alter Table Add Column - How Long to update

2006-10-19 Thread Ow Mun Heng
Just curious to know, I tried to update a table with ~1.7 million rows (~1G in size) and the update took close to 15-20 minutes before it says it's done. Is this kind of speed expected? I don't really understand how the alter table add column is done, but when I look at the "show

Re: Alter Table Add Column - How Long to update?

2006-10-17 Thread Ow Mun Heng
really understand how the alter table add column is done, but > when I look at the "show processlist" I see that it says the state is > "copying into tmp table" > > Does the alter table mean that MySQL has to copy the Entire table, > row-by-row into a temporary tab

Alter Table Add Column - How Long to update?

2006-10-17 Thread Ow Mun Heng
Just curious to know, I tried to update a table with ~1.7 million rows (~1G in size) and the update took close to 15-20 minutes before it says it's done. Is this kind of speed expected? I don't really understand how the alter table add column is done, but when I look at the "show

Re: add users in mysql 5.0 ubuntu dapper drake

2006-07-06 Thread Chris
Always CC the list. You will get better / faster responses. CREATE USER user [IDENTIFIED BY [PASSWORD] 'password'] thats is the syntax it tells me to use so i typed CREATE USER dimitri [IDENTIFIED BY [PASSWORD] '**']; were the starts are my password, i hav tried fiddling with the syntax but

Re: add users in mysql 5.0 ubuntu dapper drake

2006-07-05 Thread Chris
Dimitri Mallis wrote: hi list firstly am in the right place to ask this sort of question i installed mysql 5.0 from the repos on ubuntu dapper drake i could only go in to mysql when i was root, & then i guess i am suposed to add users there. You've got things confused. 'mysq

add users in mysql 5.0 ubuntu dapper drake

2006-07-05 Thread Dimitri Mallis
hi list firstly am in the right place to ask this sort of question i installed mysql 5.0 from the repos on ubuntu dapper drake i could only go in to mysql when i was root, & then i guess i am suposed to add users there. i have tried "man mysql" i might have missed the part

RE: Automatically add +1 every 30mins

2006-06-03 Thread Daevid Vincent
Douglas (and Dan). daevid.com > -Original Message- > From: Douglas Sims [mailto:[EMAIL PROTECTED] > Sent: Friday, June 02, 2006 10:42 AM > To: Miles Thompson > Cc: mysql@lists.mysql.com > Subject: Re: Automatically add +1 every 30mins > > > You probably don't

Re: Automatically add +1 every 30mins

2006-06-02 Thread Douglas Sims
this is something that I'd need to do with the php or mysql. Basically, I am making an add-on to my small website which is a mini online game. Every user will have gold, and every 30mins I'd like their amount of gold to go up by 1 (or say a variable say $goldupdateamount). I'd li

Re: Automatically add +1 every 30mins

2006-06-02 Thread Miles Thompson
tml http://dev.mysql.com/doc/refman/5.1/en/create-event.html Hope this helps, Dan Alex Major wrote: Hi there. I've posted this up on both this list, and the php list as I'm not sure whether this is something that I'd need to do with the php or mysql. Basically, I am making an

Re: Automatically add +1 every 30mins

2006-06-02 Thread Dan Buettner
ed this up on both this list, and the php list as I'm not sure whether this is something that I'd need to do with the php or mysql. Basically, I am making an add-on to my small website which is a mini online game. Every user will have gold, and every 30mins I'd like their amount o

Re: Automatically add +1 every 30mins

2006-06-02 Thread Miles Thompson
At 07:58 AM 6/2/2006, Alex Major wrote: Hi there. I've posted this up on both this list, and the php list as I'm not sure whether this is something that I'd need to do with the php or mysql. Basically, I am making an add-on to my small website which is a mini online game. Every

Automatically add +1 every 30mins

2006-06-02 Thread Alex Major
Hi there. I've posted this up on both this list, and the php list as I'm not sure whether this is something that I'd need to do with the php or mysql. Basically, I am making an add-on to my small website which is a mini online game. Every user will have gold, and every 30mins

Re: How do I add a column only if it doesn't exist?

2006-05-24 Thread sheeri kritzer
urious, I'm not sure this would ever come up. I don't do automatic schema changes, always do them manually, so I'm not too sure why you'd be amissunless you're running gobs of servers and some of them have the column and some of them don't.but even then you c

How do I add a column only if it doesn't exist?

2006-05-24 Thread Daevid Vincent
I want to do something like this: if not exists `hotel_page_templates`.`hpt_custom_fields` alter table `hotel_page_templates` add column `hpt_custom_fields` text after `hpt_alternate_username`; ÐÆ5ÏÐ -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe

Re: Add a new value in an ENUM by manipulate .frm

2006-05-04 Thread Jörgen Winqvist
Barry wrote: Jörgen Winqvist schrieb: Hi, I need to add another value in an enum so "ALTER TABLE table1 MODIFY Status ENUM('a','b','c')" where 'c' is the new value. My problem is that the tables are VERY big and it would take days to alt

Re: Add a new value in an ENUM by manipulate .frm

2006-05-04 Thread Barry
Jörgen Winqvist schrieb: Hi, I need to add another value in an enum so "ALTER TABLE table1 MODIFY Status ENUM('a','b','c')" where 'c' is the new value. My problem is that the tables are VERY big and it would take days to alter them all.

Add a new value in an ENUM by manipulate .frm

2006-05-04 Thread Jörgen Winqvist
Hi, I need to add another value in an enum so "ALTER TABLE table1 MODIFY Status ENUM('a','b','c')" where 'c' is the new value. My problem is that the tables are VERY big and it would take days to alter them all. So, i figure the values in

  1   2   3   4   >