Replace URL in Mysql database table

Replace URL in Mysql database table

When the project often uploads pictures, the picture address is stored in the data table with the URL. The domain name needs to be changed for other reasons, causing all the pictures to be inaccessible.

Solution
In the data table, you can execute sql regular to replace the URL

update table_name set picture=REPLACE(`picture`,'http://aaaa.com','http://bbb.com');

Guess you like

Origin blog.csdn.net/baidu_33055905/article/details/114651700