Ticker

6/recent/ticker-posts

Header Ads Widget

Shared Hosting with Namecheap. Free .Website domain & WhoisGuard

How to bulk replace a value in mysql database

 Today we are going to see how we can bulk replace a value(s) in mysql database.

First thing required for you will be to have access to phpmyadmin.

If you are using any control panel like Cpanel, you will be able to login to phpmyadmin from the cpanel interface. But if you have installed phpmyadmin separately, then you will need login credentials. General url for non-cpanel installations in domain.com/phpmyadmin


Lets assume that you have a hosting provider who uses cpanel. 

Navigate to phpmyadmin and you will be redirected to the phpmyadmin homepage which has list of all databases on the left.

Step 1. Select the database which you want to replace the values in.

Step 2. Select the table in which you need to make the changes.

Step 3. go to SQL option in the top and run the following command:

UPDATE tablename SET row = replace(row, 'old_value', 'new_value');

Please replace the red colored values with your actual database value



Now click on go. It will ask you for confirmation to run the query. Click on yes and you will be displayed with the number of rows that were changed.

Post a Comment

0 Comments