RE: Please help me.

2009-03-19 Thread Muthukumar Selvarasu
Hi

You can make a backup of the original table and recreate the table and
import. That will help you ASAP


Muthukumar Selvarasu,
Project Manager, Webmaster Ltd.

-Original Message-
From: Gary Smith [mailto:g...@primeexalia.com] 
Sent: Thursday, March 19, 2009 7:25 AM
To: Valentin Ionescu; mysql@lists.mysql.com
Cc: wi...@lists.mysql.com; mysql-h...@lists.mysql.com
Subject: RE: Please help me.

Velentin, 

http://dev.mysql.com/doc/refman/5.1/en/innodb-foreign-key-constraints.html

Note the section for the droping of foreign keys used the contraint name,
not the key name.  Try this and see if it solves the first problem (of
removing the constraint).  Then you should be able to drop the column after
that.


From: Valentin Ionescu [colibry...@yahoo.com]
Sent: Wednesday, March 18, 2009 11:27 AM
To: mysql@lists.mysql.com
Cc: wi...@lists.mysql.com; mysql-h...@lists.mysql.com
Subject: Please help me.

Hi!
My name is Valentin and I am writing to you for the following problem:
I created a database containing the table:

CREATE TABLE `documents_ex` (
  `ID` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `Journal_ex_ID` int(10) unsigned DEFAULT NULL,
  `Documents_ID` int(10) unsigned DEFAULT NULL,
  `Data` datetime DEFAULT NULL,
  `Nr` varchar(50) DEFAULT NULL,
  PRIMARY KEY (`ID`),
  UNIQUE KEY `Journal_ex_ID` (`Journal_ex_ID`,`Documents_ID`,`Data`,`Nr`),
  KEY `Documents_ID` (`Documents_ID`),
  CONSTRAINT `documents_ex_ibfk_1` FOREIGN KEY (`Journal_ex_ID`) REFERENCES
`journal_ex` (`ID`) ON DELETE CASCADE,
  CONSTRAINT `documents_ex_ibfk_2` FOREIGN KEY (`Documents_ID`) REFERENCES
`documents` (`ID`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1

After some time I decided to drop 'Journal_ex_ID' column and all its
environment from this non empty table.
All I tried to do like:

alter table documents_ex drop column Journal_ex_ID or alter table
documents_ex drop foreign key  Journal_ex_ID or alter table documents_ex
drop  key  Journal_ex_ID

 I receive the same error 150 and I don't know what to do.

Please help me.
 Best regards.




--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=g...@primeexalia.com
--
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe:
http://lists.mysql.com/win32?unsub=muthukumar...@hotmail.com



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



RE: Data transfer

2008-04-11 Thread Muthukumar Selvarasu

HI

Option 1

If you are using PHP, you can do this very simply using CRON task.

Make a field for to update either your first operation is successful (eg.
Update the field value to 1 ). Run a CRON job in particular interval if the
field updated as 1 then call your second operation query and make the field
value 0.


Option 2

If you are using MySql 5.0. check the trigger examples to perform the on
update ...

And follow the same idea like update a field value 1 and write a trigger for
upate.


I hope this will give you idea.


Thanks  regards,
Muthukumar Selvarasu,
Project Manager (Web Development),
Webmasters Ltd.




-Original Message-
From: Krishna Chandra Prajapati [mailto:[EMAIL PROTECTED] 
Sent: Friday, April 11, 2008 6:59 PM
To: mysql; [EMAIL PROTECTED]
Subject: Data transfer

Hi,

What ever queries are executed on 5 mysql server with multiple database
(more than one database on each mysql server). I have to reflect all the
changes on 1 mysql server (developement server for developers)

Initially, I thought to take take the queries from bin-log and execute on
development server. But, from the bin-log list. I am not able to identify
that which queries belong to which database.

Content of bin-log (multiple database)
# at 266708750
#080410  4:04:27 server id 1  end_log_pos 148   Query
thread_id=460143exec_time=0 error_code=0
SET TIMESTAMP=1207825467;
UPDATE user_time_stamp_1 SET TIME_TOTAL='-999' WHERE USER_ID='8394042' AND
TASK='2.30'; # at 266708898
#080410  4:04:27 server id 1  end_log_pos 266708925 Xid = 22953623
COMMIT;
# at 266708925
#080410  4:04:27 server id 1  end_log_pos 162   Query
thread_id=460143exec_time=0 error_code=0
SET TIMESTAMP=1207825467;
UPDATE user_cookie SET VALUE = '2.30_1207830154' WHERE USER_ID = '8394042'
AND PARAM = 'CURRENTTASK';
# at 266709087
#080410  4:04:27 server id 1  end_log_pos 266709114 Xid = 22953624
COMMIT;

What are the possible ways to perform this task.

--Thanks,
Krishna Chandra Prajapati


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]