August 30th, 2013, 04:50 PM
Trying to import a database but getting an error
First post on this forum. I moved a wordpress site to a new server. I've ftp'd all the files and when I tried to import the database via phpmyadmin I get this error:
-- phpMyAdmin SQL Dump
-- version 3.5.8
-- Host: localhost
-- Generation Time: Aug 30, 2013 at 09:16 PM
-- Server version: 5.1.70-cll
-- PHP Version: 5.3.17
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"
MySQL said: Documentation
#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 '-- phpMyAdmin SQL Dump
-- version 3.5.8
-- Ho' at line 1
any ideas? Thanks.
August 30th, 2013, 05:44 PM
looks like it doesn't like the comments
you can safely remove all those lines
August 30th, 2013, 08:09 PM
Ok. Looking at the database I see there are some very strange looking comments with random website links.... and some russian characters! I went into the admin area of wordpress but I dont see those comments to delete them.
Originally Posted by r937
I just want to be careful editing the database itself. In the database the comments are wrapped in double quotes. Do I simply remove everything between the double quotes?
By the way, do you think the site's been hacked? Looks like it to me.
August 30th, 2013, 08:24 PM
By comments he is referencing the SQL comments, IE lines beginning with --. It has nothing to do with any comments on your blog posts.
I'm not well versed in how wordpress handles deleting comments but probably rather than remove the delete comments from the database it just marks them as deleted. This would be why you see those spam comments in the SQL dump but not in the admin area.
Delete just lines that begin with -- and do not change anything else. Try the import again when complete and see if it works.
Recycle your old CD's, don't just trash them
If I helped you out, show some love with some reputation, or tip with Bitcoins to 1N645HfYf63UbcvxajLKiSKpYHAq2Zxud
August 31st, 2013, 05:14 PM
Thanks. Just one thing: I can see where the comment begins (--). I'm having trouble determining where the line ends. I'm not quite sure how much to remove. Is there something there to tell me "this is the end of the line"? Thanks.
Originally Posted by kicken
August 31st, 2013, 05:52 PM
i would imagine the standard carriage-return-line-feed characters (hexadecimal 0D0A)
Originally Posted by Dgriff
August 31st, 2013, 09:20 PM
Well I sorted it without having to delete any comments. I just put this line at the very top:
Thanks for your help though.