En MySQL <8.0, donde regexp_replace()
y similares no son compatibles, puede usar funciones de cadena:
update wp_comments
set comment_content = concat(
substr(comment_content, 1, locate('XXX', comment_content) - 1),
'MMM',
substr(comment_content, locate('XXX', comment_content) + 3)
)
where comment_id = 334 and locate('XXX', comment_content) > 0
comment_id | comment_content ---------: | :----------------------------------------------------------------------------- 334 | Hello MMM tomorrow we XXX will meeting in XXX Dubai, Do you want join us XXX ?