Replace a name in all mysql database tables

Asked

Viewed 101 times

1

Good morning. I need to replace a domain that is in several tables of the comic. That would be the correct form?

SELECT REPLACE('*', 'velho.dominio.com', 'novo.dominio.com');

As there are many tables I want the select to go through everything. Tables and lines

Thank you.

  • 1

    I don’t think this will solve it. I don’t know how big your database is but I believe that the best way would be to give a dump and then find and replace. See if this does not help you.

  • I found a better alternative... I downloaded the comic to the pc and then using Notepad++ I changed everything...

  • 1

    that’s exactly what @8bit said.

  • Don’t understand why not do an update? UPDATE table set = "new.dominio.com" Where domain = "old.dominio.com"

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.