MySQL Forums
Forum List  »  Newbie

Re: too long to 'source;
Posted by: Rick James
Date: January 29, 2015 10:54AM

   DROP   TABLE IF EXISTS db2.location
   CREATE TABLE           db2.location    LIKE       db1.location;
   INSERT INTO            db2.location SELECT * FROM db1.location;

   DROP   TABLE IF EXISTS db2.cdrs
   CREATE TABLE           db2.cdrs    LIKE       db1.cdrs;
   INSERT INTO            db2.cdrs SELECT * FROM db1.cdrs;

   DROP   TABLE IF EXISTS db2.roles
   CREATE TABLE           db2.roles   LIKE        db1.roles;
   INSERT INTO            db2.roles SELECT * FROM db1.roles;

   DROP   TABLE IF EXISTS db2.music
   CREATE TABLE           db2.music   LIKE        db1.music;
   INSERT INTO            db2.music SELECT * FROM db1.music;

Put that in the file "copy.sql", then execute it via
mysql ... < copy.sql

Options: ReplyQuote


Subject
Written By
Posted
January 28, 2015 01:01PM
January 28, 2015 02:00PM
January 28, 2015 02:09PM
January 28, 2015 02:40PM
January 28, 2015 02:40PM
January 28, 2015 02:47PM
January 28, 2015 04:56PM
January 28, 2015 07:42PM
January 28, 2015 11:08PM
January 29, 2015 08:30AM
Re: too long to 'source;
January 29, 2015 10:54AM
January 29, 2015 01:35PM
February 06, 2015 04:00PM
January 29, 2015 02:45PM
January 30, 2015 11:07AM
January 30, 2015 12:28PM
January 30, 2015 12:32PM
February 06, 2015 02:04PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.