I am trying to execute the following SQL queries on a database.
UPDATE wp_options SET option_value = replace(option_value, ‘http://yourdomain’, ‘http://your-elastic-ip’) WHERE option_name = ‘home’ OR option_name = ‘siteurl';
I replace "yourdomain" with my domain, and I replace "your-elastic-ip" with my IP address on Amazon Web Services. However, I keep getting an SQL syntax error. It says:
WHERE option_name = ‘home’ OR option_name = ‘siteurl';
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE option_name = ‘home’ OR option_name = ‘siteurl'' at line 1.
What am I doing wrong? Am I not understanding exactly what to put in the proper fields? What am I supposed to replace "home" and "siteurl" with?
What user2182349 is trying to say is: replace it with this:
UPDATE wp_options SET option_value = replace(option_value, 'http://yourdomain', 'http://your-elastic-ip') WHERE option_name = 'home' OR option_name = 'siteurl';
Notice how the single quotes are different. You have curly quotes, I've replaced them with straight ones, as MySQL doesn't recognise the curly ones. (You can see how it's interpreted them at the end of your error message).