Solved

Replace Value in all tables in MySQL

Posted on 2011-09-12
3
386 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
ID: 36526793
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
ID: 36531680
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
ID: 36997218
thanks
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Fore-Foreword Today (2016) Maxmind has a new approach to the distribution of its data sets.  This article may be obsolete.  Instead of using the examples here, have a look at the MaxMind API (https://www.maxmind.com/en/geolite2-developer-package). …
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.
Hi friends,  in this video  I'll show you how new windows 10 user can learn the using of windows 10. Thank you.
Both in life and business – not all partnerships are created equal. As the demand for cloud services increases, so do the number of self-proclaimed cloud partners. Asking the right questions up front in the partnership, will enable both parties …

911 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

21 Experts available now in Live!

Get 1:1 Help Now