Mysql database problem
-
Hi Everyone, so i have a problem with my MySQL database, whenever i try to import the database i get an error that says
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
I was running a site and using VestaCP i wanted to reinstall my server, so i simply exported the database from PHPmyAdmin and then reinstalled the whole server. Then again i installed VestaCP and now when i am trying to import the Database i get the following error
ERROR 1064 (42000) at line 31734: 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 ''C:24:"WPSEO_Sitemap_Cache_Data":152414:{a:2:{s:6:"status";s:2:"ok";s:3:"xml";s:' at line 2
It is a wordpress database, i really have no clue as to whats happening. If you guys can help me out i'd appreciate it. I read some articles on Google, and i think its related to the Mysql or PHp versions. But i couldn't find answers or threads specifically for this issue. So please help me out ASAP because my website is down from days. Thanks
-
Hi Everyone, so i have a problem with my MySQL database, whenever i try to import the database i get an error that says
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
I was running a site and using VestaCP i wanted to reinstall my server, so i simply exported the database from PHPmyAdmin and then reinstalled the whole server. Then again i installed VestaCP and now when i am trying to import the Database i get the following error
ERROR 1064 (42000) at line 31734: 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 ''C:24:"WPSEO_Sitemap_Cache_Data":152414:{a:2:{s:6:"status";s:2:"ok";s:3:"xml";s:' at line 2
It is a wordpress database, i really have no clue as to whats happening. If you guys can help me out i'd appreciate it. I read some articles on Google, and i think its related to the Mysql or PHp versions. But i couldn't find answers or threads specifically for this issue. So please help me out ASAP because my website is down from days. Thanks
-
Can you not post the full SQL? But I suggest you look at the second of the first pair of apostrophe's, which on the face of it should either not be there or be escaped.
You are taking about these
''C:24
apostrophes? i just have to remove this from the sql file and upload it? I cant post the full sql file because its 1 GB and very very large.
-
You are taking about these
''C:24
apostrophes? i just have to remove this from the sql file and upload it? I cant post the full sql file because its 1 GB and very very large.
Quote:
just have to remove this from the sql file
Not necessarily, it depends on what comes before it - if those are just two apostrophe's on their own in the middle of a longer statement they're fine, and the problem lies elsewhere. BUT you shouldn't really be posting strings in an SQL statement anyway - it's a security risk; look into paramatised queries instead And they are far less prone to syntax errors
-
You are taking about these
''C:24
apostrophes? i just have to remove this from the sql file and upload it? I cant post the full sql file because its 1 GB and very very large.
Member 13755227 wrote:
I cant post the full sql file because its 1 GB and very very large.
1 GB? :confused: I thought the limit is about 1 Mb...:confused:
-
Member 13755227 wrote:
I cant post the full sql file because its 1 GB and very very large.
1 GB? :confused: I thought the limit is about 1 Mb...:confused:
-
Hi Everyone, so i have a problem with my MySQL database, whenever i try to import the database i get an error that says
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
I was running a site and using VestaCP i wanted to reinstall my server, so i simply exported the database from PHPmyAdmin and then reinstalled the whole server. Then again i installed VestaCP and now when i am trying to import the Database i get the following error
ERROR 1064 (42000) at line 31734: 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 ''C:24:"WPSEO_Sitemap_Cache_Data":152414:{a:2:{s:6:"status";s:2:"ok";s:3:"xml";s:' at line 2
It is a wordpress database, i really have no clue as to whats happening. If you guys can help me out i'd appreciate it. I read some articles on Google, and i think its related to the Mysql or PHp versions. But i couldn't find answers or threads specifically for this issue. So please help me out ASAP because my website is down from days. Thanks
Member 13755227 wrote:
at line 2
So right at the top of the file. The error message certainly seems to suggests that the imported file is NOT sql. If you export a database using process X then you must import it using process X also. Because the export and import can use a format specific to that process and not a general one.
-
jschell wrote:
What limit are you talking about? A 1 meg database would be pretty small these days.
The SQL file. I meant a limit for SQL query, not a limit of the database itself. If I incorrectly understood the OP then sorry!