Solved

Replace Value in all tables in MySQL

Posted on 2011-09-12
3
392 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
mysql ide 10 48
Restore of mysql database from .SQL file - using Coldfusion 5 47
mysql date time 14 43
Why can I INSERT a DATETIME record into mysql but I can't UPDATE it? 15 33
This guide whil teach how to setup live replication (database mirroring) on 2 servers for backup or other purposes. In our example situation we have this network schema (see atachment). We need to replicate EVERY executed SQL query on server 1 to…
Does the idea of dealing with bits scare or confuse you? Does it seem like a waste of time in an age where we all have terabytes of storage? If so, you're missing out on one of the core tools in every professional programmer's toolbox. Learn how to …

740 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