LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-01-2010, 03:02 AM   #1
fernfrancis
Member
 
Registered: Feb 2009
Location: Goa(India)-Sharjah(UAE)
Distribution: RHEL,centos,fedora,ubuntu
Posts: 229

Rep: Reputation: 18
mysql help linux cent os 5.4


HI All
i have a certain database on live server and a similar environment for test, the problem i am facing now is that the developers have added a new column to all the tables in the database, now when i try to restore the backup from live to the test i cant restore it as there is a extra column

can someone suggest a way to do this
 
Old 09-01-2010, 08:10 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
Depends on how you took the back-up, what the data looks like; if you
stored away plain insert statements in ASCII you could simply tack on
the "extra column" with sed.

Of course it depends on what the requirements for the new column are,
whether there are any constraints on it (and whether or not your
version of MySQL [and the database engine you chose on installation]
actually supports/honours these or not ... ).

More detail in your problem description will render better responses.


Cheers,
Tink
 
Old 09-01-2010, 11:57 PM   #3
fernfrancis
Member
 
Registered: Feb 2009
Location: Goa(India)-Sharjah(UAE)
Distribution: RHEL,centos,fedora,ubuntu
Posts: 229

Original Poster
Rep: Reputation: 18
Thanks a lot , i solved the problem
i just restored the copy of thee latest dump and wrote a small sql script to cerate a extra column in which ever table necessary with a default value

that solved the problem

thanx
 
Old 09-02-2010, 12:16 AM   #4
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
I'm scared ... did you just say that the developers changed the tables
in the LIVE database, and you then wanted to push that into test?! :D


Cheers,
Tink
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] VTIGER CRM IN Cent OS LINUX Aneeshvm123 Linux - Server 1 06-28-2010 03:22 PM
Weird things with gd and yum mysql on php compile 64 bit cent os 5 centosfan Linux - Server 2 09-16-2009 02:26 PM
LXer: Linux breaks one per cent LXer Syndicated Linux News 0 05-01-2009 12:00 PM
linux rescue not working in cent os 4.3 ramesh.mimit Red Hat 4 10-03-2007 10:43 AM


All times are GMT -5. The time now is 07:03 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration