Solved

Replace Value in all tables in MySQL

Posted on 2011-09-12
3
380 Views
Last Modified: 2012-05-12
Hi guys,

Kindly help.

in ALL Tables in a database in MySQL, I wanna replace '192.168.1.30:8000' with other value : '192.168.1.30:80'
0
Comment
Question by:softbless
3 Comments
 
LVL 59

Assisted Solution

by:Kevin Cross
Kevin Cross earned 250 total points
Comment Utility
Is it always the same column in each table? The gist is you will need to use the INFORMATION_SCHEMA to get all the tables and build dynamic SQL scripts to update column data as needed. If this is in variable columns, then you work will just be a little more complicated as you will also have to use the INFORMATION_SCHEMA to find all VARCHAR column.
0
 
LVL 16

Accepted Solution

by:
Swadhin Ray earned 250 total points
Comment Utility
if you don't know where exactly this value '192.168.1.30:8000'  is stored in which tables/databases etc then I would prfere to dump all the databases/tables using mysqldump.. and since the logicaldump is nothing but a just text file. I would use any commandline utlity to just search and replace the text '192.168.1.30:8000'  by '192.168.1.30:80'. Once this is done will load the dumpfile back to mysql using mysql commandline utility.
0
 

Author Closing Comment

by:softbless
Comment Utility
thanks
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Foreword In the years since this article was written, numerous hacking attacks have targeted password-protected web sites.  The storage of client passwords has become a subject of much discussion, some of it useful and some of it misguided.  Of cou…
Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now