Error while changing paths in MySQL
Hi iam trying to change the path in some links in my WordPress database.
In my table
wp_commeentmeta
, I am using the syntax:
UPDATE table SET meta_value = REPLACE(meta_value, 'http://articles.mydomain.com', 'http://localhost/articles')
BUT I get the following ERROR:
,#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 'table SET meta_value = REPLACE(meta_value,
'http://articles.mydomain.com', 'http' at line 1
Any help on this please?
Please note :
I am using phpMyAdmin for this.
Solutions
Change the table to be the name of your table
UPDATE wp_commeentmeta
SET meta_value = REPLACE(
meta_value,
'http://articles.mydomain.com',
'http://localhost/articles'
);
(Just fyi, the linebreaks aren't important, just makes the query more readable)
Similar questions
Error while changing the url of a wordpress website
I made a mistake in my wordpress website, indeed I changed the url in the general panel. I changed from a .com website to a .fr website without buying the domain name before. And now I can not access to my website and got this error : DNS_PROBE_FINISHED_NXDOMAIN How can I fixed it ? thanks
Mysql Queries Error Inside a While Loop
I have a while loop from a query called $result. Inside this while loop I have two other queries $anchors1 and $anchors2 The first one retrieves the first 2 rows; The second one should retrieve the following ones using an offset. For some reason the queries seem to interact one another, not displaying the 3 row and pulling a duplicate row which sho...
Mysql Error While Importing
I am trying to import Mysql Data taken from Wordpress blog locally on Window 7 system. One way or other it is giving error. The table wp_commentmeta was giving error. I have deleted all aksimet rows, but still error was coming. So, quit that table and included other tables. But now as well error is coming, which I do not understand: Error: There is...
Unknown authentication method error while using wordpress and mysql docker images
I am trying to install wordpress with mysql via docker but I have communication errors between the container of the DB and the wordpress container. here is my docker-compose.yml file If I execute the "docker-compose up -d" command and that I open the logs of the wordpress container I have this error: I added command: '--default-authentication plugi...
MySQL table column name beginning with a number produce error while select query
This is my Table structure, I trying to get data by select query, I got the result but when I try to access the " 8a " column, getting an error. Error: [09-Dec-2019 16:38:20 UTC] PHP Parse error: syntax error, unexpected '8' (T_LNUMBER), expecting identifier (T_STRING) or variable (T_VARIABLE) or '{' or '$' in details.php on line 93
Also ask