List:General Discussion« Previous MessageNext Message »
From:Duncan Hill Date:April 19 2007 3:08pm
Subject:Re: Trying to open a big sql script
View as plain text  
On Thursday 19 April 2007 15:53:54 molemenacer wrote:
> I am trying to change all the names of the database from mthosp to another
> name, is this possible?

Assuming you mean tables, not database (as mysqldump doesn't store the 
database name in the dump file [or at least never has for me]):

sed -e 's/mthosp/another_name/' < source.sql > dest.sql

mysql> rename table mthosp_1 to another_name_1, mthosp_2 to another_name_2
(Check the manual for syntax)
Thread
Trying to open a big sql scriptmolemenacer19 Apr
  • Re: Trying to open a big sql scriptDuncan Hill19 Apr
    • Re: Trying to open a big sql scriptMogens Melander19 Apr
      • Re: Trying to open a big sql scriptMichael Dykman19 Apr
  • Re: Trying to open a big sql scriptDan Buettner19 Apr
    • Re: Trying to open a big sql scriptmolemenacer19 Apr
      • Re: Trying to open a big sql scriptDuncan Hill19 Apr
        • Re: Trying to open a big sql scriptJoerg Bruehe20 Apr
          • Re: Trying to open a big sql scriptGerald L. Clark20 Apr
      • Re: Trying to open a big sql scriptMogens Melander19 Apr
RE: Trying to open a big sql scriptAndreas Iwanowski20 Apr