Since the upgrade of zhp1.5, we have been using the most secure HTTPS access, but we also encountered many problems during this period, such as the previous blog pictures, because this site uses the Seven Bull Cloud storage, and all the pictures are in the form of http, but this problem will lead to unsafe factors in the web page display website.

 Tutorial on batch replacement of https for zblogphp database JPG

On the way home from work last night, I suddenly remembered whether MySQL could execute SQL statements to achieve batch replacement. I asked the group at work this morning The blogger Xiaofeng said that he could and gave me the connection, and then started to operate according to the tutorial,

Update table name set field name=(REPLACE (field name, 'http://', 'https://'));

But there is a problem. Not everyone has learned MySQL. What is the table name? What is the field name? There are many people who don't understand this, so here's a simple way to improve the tutorial: if the sentence is completed correctly, first go to the database (the account password is my own idea, not all hosts support sql statements, which depends on the host vendor) to find the zbp mysql database, as shown in the figure:

 MySQL batch replacement.jpg

Enter the SQL statement just now

update zbp_post set log_Content =(REPLACE( log_Content ,'http://','https://'));

among   zbp_post It is the so-called database table name.

In addition log_Content  It is the database field name.

PS: Remember to replace the original image connection of the article with a new https connection, Then click Execute to complete batch replacement:

 MySQL batch replacement.png

As shown in the figure, http to https has been successfully replaced. The tutorial is over, thank you@ Xiaofeng Blog , the content of the article comes from Song Zhenjiang Blog

    Comment List (Already four Of comments four thousand eight hundred and thirty-eight Participation) Participate in the discussion
     Netizen nickname: Zhulou
    Building tourist floor
    2017-02-07 reply
    Can you help me find out where my products are not completely replaced? Why can't it turn green like yours?
     Netizen nickname: zblog
    zblog tourist chair
    2017-01-02 reply
    [B] Learned [/B]
     Netizen nickname: mobile frog ranking software
    2016-12-16 reply
    Thanks for sharing. This database conversion is very important for zblogphp blog. It will be used sooner or later
     Netizen nickname: none but Li
    None but Li Blogger
    2016-12-16 reply
    @Mobile Frog ranking software Well, it's very useful. You can forward it to Weibo;