No announcement yet.

Replace string in database?

  • Filter
  • Time
  • Show
Clear All
new posts

  • Replace string in database?

    Hi folks. I have a wordpress site that was hacked. It is in the images / media descriptions with strings like: <a style="text-decoration:none" href=".*".*a>
    Navicat finds 729 posts with this regex. How can I do a find and replace this string with nothing? I'm a regex and query newbie, so any help would be greatly appreciated.
    There is a search and replace function for posts with a plugin but when I ran the query, it replaced the string with <> instead of nothing. I guess I did not properly escape the string. But in any case, it will not search through the images and media table.


  • #2
    I am sorry that Navicat does not support replace feature in the whole database. Currently, it only allow find and replace data in a table. Your request has been forwarded to our development team. We will keep improving Navicat in future.


    • #3
      what about my question for a specific table? I can find the tables with the offending text in it... I would need instruction on a replace feature for the affected tables.. Please!


      • #4
        Hi Jeff,

        Would you please provide us the following information? You can send the information to our support center -

        1. Sample table sql file. Right-click your table and choose Dump SQL File > Structure And Data
        2. The strings that you want to replace and replace with.