Solved

Replace Value in all tables in MySQL

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

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

Get Database Help Now w/ Support & Database Audit

Keeping your database environment tuned, optimized and high-performance is key to achieving business goals. If your database goes down, so does your business. Percona experts have a long history of helping enterprises ensure their databases are running smoothly.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Could you point what's preventing a remote MySQL server to be accessed? 8 62
mysql qry 1 38
MySQL stored procedure returning null values 4 37
php hashing methods 3 50
All XML, All the Time; More Fun MySQL Tidbits – Dynamically Generate XML via Stored Procedure in MySQL Extensible Markup Language (XML) and database systems, a marriage we are seeing more and more of.  So the topics of parsing and manipulating XM…
This article shows the steps required to install WordPress on Azure. Web Apps, Mobile Apps, API Apps, or Functions, in Azure all these run in an App Service plan. WordPress is no exception and requires an App Service Plan and Database to install
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…
This video shows how to use Hyena, from SystemTools Software, to update 100 user accounts from an external text file. View in 1080p for best video quality.

751 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