Solved

Replace Value in all tables in MySQL

Posted on 2011-09-12
3
389 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

VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

Question has a verified solution.

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

Suggested Solutions

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). …
Introduction In this article, I will by showing a nice little trick for MySQL similar to that of my previous EE Article for SQLite (http://www.sqlite.org/), A SQLite Tidbit: Quick Numbers Table Generation (http://www.experts-exchange.com/A_3570.htm…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

777 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