Copying tables between databases

2008-10-09 Thread Eric Anderson
I've got two databases Foo and Bar. Both databases have a table called 'zoop_t'. Foo's is the master copy (i.e. the one that gets updated) and Bar needs to be updated if/when changes are made. Currently, I'm mysqldump'ing that table from Foo at midnight via cron and feeding it back into

Re: Copying tables between databases

2008-10-09 Thread Rob Wultsch
Assuming that both databases are on the same mysqld instance setting triggers to keep the table up to date should do what you want... On Thu, Oct 9, 2008 at 10:34 AM, Eric Anderson [EMAIL PROTECTED] wrote: I've got two databases Foo and Bar. Both databases have a table called 'zoop_t'. Foo's

Copying tables

2008-03-10 Thread skills2go
Hi Folks I'm trying to copy a database table form one database to another on a different server. Is it possible through myphpadmin, or do I need software? If software, do you know of any good programs to do this? Bob -- View this message in context: http://www.nabble.com/Copying-tables

Re: Copying tables

2008-03-10 Thread Daniel Brown
On Mon, Mar 10, 2008 at 2:58 PM, skills2go [EMAIL PROTECTED] wrote: Hi Folks I'm trying to copy a database table form one database to another on a different server. Is it possible through myphpadmin, or do I need software? If software, do you know of any good programs to do this?

Re: Copying tables

2008-03-10 Thread Tim McDaniel
On Mon, 10 Mar 2008, Daniel Brown [EMAIL PROTECTED] wrote: On Mon, Mar 10, 2008 at 2:58 PM, skills2go [EMAIL PROTECTED] wrote: I'm trying to copy a database table form one database to another on a different server. Is it possible through myphpadmin, or do I need software? If software, do

Re: Copying tables

2008-03-10 Thread Daniel Brown
On Mon, Mar 10, 2008 at 3:26 PM, Tim McDaniel [EMAIL PROTECTED] wrote: On Mon, 10 Mar 2008, Daniel Brown [EMAIL PROTECTED] wrote: The same question just received an excellent answer from Rolando Edwards about ten minutes ago. Check the archive here:

Copying tables sans data from one database to another

2006-06-07 Thread murthy gandikota
How can I copy tables from one database to another on the same host? Thanks for your help Murthy __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com

Re: Copying tables sans data from one database to another

2006-06-07 Thread Douglas Sims
Perhaps the easiest way is with CREATE TABLE... SELECT. For example, if I have a database called NYCNH (by coincidence, I do!) which contains a table called checks and I want to copy that table to a database called TEST I could do this: mysql create table test.checks select * from

Re: Copying tables sans data from one database to another

2006-06-07 Thread Dilipkumar
Hi, It is Rename table name to database.tablename. db-1 db-2 rename db1.tablename to db2.tablename. This might help you out. murthy gandikota wrote: How can I copy tables from one database to another on the same host? Thanks for your help Murthy

Copying Tables with Foreign Keys

2004-05-26 Thread David Blomstrom
Can you run into problems when copying tables with foreign keys? I want to copy my Nations and States tables, making versions designed only to hold lengthy articles. I copied and coverted the States table successfully, but I'm running into problems with the Nations table. I get an error message

Re: Copying Tables with Foreign Keys

2004-05-26 Thread Ligaya Turmelle
PROTECTED] wrote in message news:[EMAIL PROTECTED] Can you run into problems when copying tables with foreign keys? I want to copy my Nations and States tables, making versions designed only to hold lengthy articles. I copied and coverted the States table successfully, but I'm running into problems

Re: copying tables

2002-11-20 Thread Keith C. Ivey
On 20 Nov 2002, at 12:54, Steve Buehler wrote: What I am trying to do is to copy a mysql table to a new table name in a PHP script. Use the query SHOW CREATE TABLE $from_table to get the SQL statement for creating the table, then do $create_table_sql = preg_replace(

Re: copying tables

2002-11-20 Thread Steve Buehler
Thank You. I am not sure which one is faster because I don't have any HUGE tables to test it on, but someone from the PHP mailing list gave me the following that works like a charm. create table table2 select * from table1 Thanks Steve At 02:09 PM 11/20/2002 -0500, you wrote: On 20 Nov 2002,

Re: copying tables

2002-11-20 Thread Keith C. Ivey
On 20 Nov 2002, at 16:01, Steve Buehler wrote: Thank You. I am not sure which one is faster because I don't have any HUGE tables to test it on, but someone from the PHP mailing list gave me the following that works like a charm. create table table2 select * from table1 The problem with

copying tables

2002-11-20 Thread Steve Buehler
Using PHP and MySQL. I have looked and can't find the answer to this problem. What I am trying to do is to copy a mysql table to a new table name in a PHP script. The reason for this is to keep the original table the way it is and editing the copy. Now, I know that I can go through a loop

Re: [PHP] copying tables

2002-11-20 Thread Chris Shiflett
--- Steve Buehler [EMAIL PROTECTED] wrote: What I am trying to do is to copy a mysql table to a new table name in a PHP script. An SQL statement similar to this might be what you are looking for: create table tmp_foo as select * from foo I believe this will fail to create any keys, indeces,

Re: [PHP] copying tables

2002-11-20 Thread Justin French
Hi, I don't have the answer, but when that happens, the first thing I do is dig around in phpMyAdmin(.org)... it's a web based GUI for MySQL, and most of the time, when you do something (like copy a table), it shows you the query used to do it... then you just need to copy it, and integrate it

Copying Tables across machines

2002-10-14 Thread Dennis
Is there a way to copy a table from one mySQL machine to another without implementing replication? The goal is be able to grab a copy of a table from some other machine (without regard to master/slave relationships) in some programmatic way without having to do a dump, copy file and rebuild.

Re: Copying Tables across machines

2002-10-14 Thread Iikka Meriläinen
On Mon, 14 Oct 2002, Dennis wrote: Is there a way to copy a table from one mySQL machine to another without implementing replication? The goal is be able to grab a copy of a table from some other machine (without regard to master/slave relationships) in some programmatic way without having

RE: Copying Tables across machines

2002-10-14 Thread Dennis
At 02:51 PM 10/14/2002, you wrote: Is there a way to copy a table from one mySQL machine to another without implementing replication? The goal is be able to grab a copy of a table from some other machine (without regard to master/slave relationships) in some programmatic way without

RE: Copying Tables across machines

2002-10-14 Thread Paul DuBois
operation, without using mysqldump. If your table is a MyISAM table, you can directly copy the table files with scp or something, but then you have to think about having the server flush the tables first, to make sure that you're not copying tables that have some active operation going on them. Ick

Is there a sql query to Copying tables

2002-04-15 Thread Jason
Is there an easy way to copy/use the structure (not data) of a skeleton table to a new table? Thanks in advance PS how long has the sql,query requirement been on this list? - Before posting, please check:

RE: Is there a sql query to Copying tables

2002-04-15 Thread Gurhan Ozen
[mailto:[EMAIL PROTECTED]] Sent: Monday, April 15, 2002 11:45 AM To: [EMAIL PROTECTED] Subject: Is there a sql query to Copying tables Is there an easy way to copy/use the structure (not data) of a skeleton table to a new table? Thanks in advance PS how long has the sql,query requirement been

Re: Is there a sql query to Copying tables

2002-04-15 Thread Lance Uyehara
Is there an easy way to copy/use the structure (not data) of a skeleton table to a new table? create table x select * from table y where 1=0; -Lance filter: sql - Before posting, please check:

Re: Is there a sql query to Copying tables

2002-04-15 Thread Richard Emery
CREATE TABLE new_table SELECT * FROM old_table LIMIT 0; - Original Message - From: Jason [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, April 15, 2002 10:44 AM Subject: Is there a sql query to Copying tables Is there an easy way to copy/use the structure (not data) of a skeleton

Re: Copying tables

2002-04-15 Thread Jason
Subject: Re: Copying tables Your message cannot be posted because it appears to be either spam or simply off topic to our filter. To bypass the filter you must include one of the following words in your message: sql,query If you just reply to this message, and include the entire text

Copying tables problem

2002-02-20 Thread Jaz-Michael King
Hi all, I have a thorny problem and I hope this is the right place, I've been everywhere else I could think of. I have limited skills in this area. I have a site with content management run by mysql/php (just to be original), using two databases on the same machine. db1 is the working copy for

RE: copying tables between databases in mySQL 3.22.32

2001-06-20 Thread Chris Bolt
http://www.mysql.com/doc/R/E/RENAME_TABLE.html says: As long as two databases are on the same disk you can also rename from one database to another: RENAME TABLE current_database.table_name TO other_database.table_name; And as the user comments say, you can use ALTER TABLE with 3.22. Copying

copying tables between databases in mySQL 3.22.32

2001-06-19 Thread Arno Schoenmakers
Hi, I am using mySQL 3.22.23 on a Linux platform. How can I copy or move Tables between different Databases? Is there a simple command for that? We do not have the mysqlhotcopy command; is it safe to download and use for our mySQL version, and can it do what I want it to do? I cannot find