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
Solved

find and replace mysql

Posted on 2014-10-24
3
278 Views
Last Modified: 2014-10-25
In this case, I have several tables which have a clientid of 30.
I need to find every single instance and switch those over to clientid 150.

I am using phpmyadmin in this case but can also do this from the command line if needed.

mysql-server-5.5.40
0
Comment
Question by:projects
  • 2
3 Comments
 
LVL 50

Accepted Solution

by:
Steve Bink earned 500 total points
ID: 40404055
Quick and dirty..  For each of the tables you need to change:
UPDATE <tablename> SET clientid=150 WHERE clientid=30

Open in new window

0
 

Author Comment

by:projects
ID: 40404379
Thank you. I'm amazed that I wasn't able to find something this simple when searching the net.
0
 
LVL 50

Expert Comment

by:Steve Bink
ID: 40404440
You can find more information in the MySQL docs.  Good luck!
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

Suggested Solutions

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…
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

809 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