SQL Problems during import: #1064 - You have an error in your SQL syntax
Posted by: ChrisUCLA (---.socal.res.rr.com)
Date: August 11, 2013 12:43AM

Hi, I took my last site off of godaddy to serve on my wamp with 2 working wordpress sites. (Apache 2.4.2, php 5.4.3, MySQL 5.5.24)

WHile importing the sql database, I got the following error (BEGINNING OF ERROR) :

Error
SQL query:

CREATE TABLE wp_netblog_bibitem (

itemID INT( 10 ) UNSIGNED NOT NULL AUTO_INCREMENT ,
fieldID SMALLINT( 5 ) UNSIGNED NOT NULL ,
fieldValue VARCHAR( 255 ) NOT NULL ,
usage INT( 10 ) UNSIGNED NOT NULL DEFAULT '1',
PRIMARY KEY ( itemID )
) ENGINE = M-- MySQL dump 10.11
--
-- Host: localhost Database: fra1301704504244
-- ------------------------------------------------------
-- Server version 5.0.96-log
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;

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 'SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */' at line 13

(END OF ERROR) and then when trying to acces the wp-admin page, it directed to a repair page and gave me these errors and said paste them in the forum:

wp_users: Table 'franklinian.wp_users' doesn't exist
wp_usermeta: Table 'franklinian.wp_usermeta' doesn't exist
wp_posts: Table 'franklinian.wp_posts' doesn't exist
wp_options: Table 'franklinian.wp_options' doesn't exist
wp_postmeta: Table 'franklinian.wp_postmeta' doesn't exist
wp_terms: Table 'franklinian.wp_terms' doesn't exist
wp_term_taxonomy: Table 'franklinian.wp_term_taxonomy' doesn't exist
wp_term_relationships: Table 'franklinian.wp_term_relationships' doesn't exist

Im totally lost as what to do with this.

Options: ReplyQuote
Re: SQL Problems during import: #1064 - You have an error in your SQL syntax
Posted by: RiggsFolly (---.as13285.net)
Date: August 12, 2013 10:23AM

Here is your error:

ENGINE = M-- MySQL dump 10.11

I assume you are using the MyISAM engine so change 'M-- MySQL dump 10.11' to 'Engine = MyISAM'

Options: ReplyQuote
Re: SQL Problems during import: #1064 - You have an error in your SQL syntax
Posted by: ChrisUCLA (---.socal.res.rr.com)
Date: August 12, 2013 10:12PM

Im way lost.. Ok, the sql backup file came from godaddy, and I tried to import that file into my wamp, (Apache 2.4.2, php 5.4.3, MySQL 5.5.24), and that is when I got the error message.

So, are you saying I open the sql file and edit it (change 'M-- MySQL dump 10.11' to 'Engine = MyISAM')? Do I use a simple text editor? I have never touched sql before. Would that be just the one instance? And then would I try to import it again?

Thank you

Options: ReplyQuote
Re: SQL Problems during import: #1064 - You have an error in your SQL syntax
Posted by: RiggsFolly (---.as13285.net)
Date: August 12, 2013 11:48PM

yes edit it with a text editor.

No you will probably have to edit each CREATE TABLE

Yes, then do the import again.

Options: ReplyQuote
Re: SQL Problems during import: #1064 - You have an error in your SQL syntax
Posted by: ChrisUCLA (---.socal.res.rr.com)
Date: August 13, 2013 12:46AM

Ok, so this is what is says now:

Error
SQL query:

CREATE TABLE `wp_netblog_bibitem` (

`itemID` INT( 10 ) UNSIGNED NOT NULL AUTO_INCREMENT ,
`fieldID` SMALLINT( 5 ) UNSIGNED NOT NULL ,
`fieldValue` VARCHAR( 255 ) NOT NULL ,
`usage` INT( 10 ) UNSIGNED NOT NULL DEFAULT '1',
PRIMARY KEY ( `itemID` )
) ENGINE = MYISAM --
-- Host: localhost Database: fra1301704504244
-- ------------------------------------------------------
-- Server version 5.0.96-log
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;

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 'SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */' at line 13

Options: ReplyQuote
Re: SQL Problems during import: #1064 - You have an error in your SQL syntax
Posted by: ChrisUCLA (---.socal.res.rr.com)
Date: August 13, 2013 12:52AM

On the other working sites, the databases say under the "TYPE" tab "InnoDB" , they work fine.

Options: ReplyQuote
Re: SQL Problems during import: #1064 - You have an error in your SQL syntax
Posted by: RiggsFolly (---.as13285.net)
Date: August 13, 2013 01:12AM

It should be ENGINE = MyISAM, remove the -- and its case sensitive i.e. the lowercase 'y'

I have to admit I assumed the engine was MyISAM as the faulty backup you showed started with an 'M'

It might be an idea to check the database where you did the backup to see what engine type is set there. It may also be an idea to do the backup again, to see if it does it correctly this time! As it appears to have been corrupted somehow either during the backup or transfer of the file.

Options: ReplyQuote
Re: SQL Problems during import: #1064 - You have an error in your SQL syntax
Posted by: ChrisUCLA (---.socal.res.rr.com)
Date: August 13, 2013 01:41AM

How odd.. I did input it exactly "ENGINE=MyISAM", replacing the "M-- ...."

I just looked through the entire sql and ENGINE=MyISAM is proper all the way through, with the exception to that one instance that you directed me to edit.

Unfortunately, godaddy isn't being very helpful and say they want $$$$ to attempt to re-locate my saved website. They don't like that I moved all my sites to serve at home.

Options: ReplyQuote
Re: SQL Problems during import: #1064 - You have an error in your SQL syntax
Posted by: RiggsFolly (---.as13285.net)
Date: August 13, 2013 01:43AM

Well if this import worked all is now ok.

Options: ReplyQuote
Re: SQL Problems during import: #1064 - You have an error in your SQL syntax
Posted by: ChrisUCLA (---.socal.res.rr.com)
Date: August 13, 2013 01:54AM

But it didn't work, tried it over, same thing. When I import, do I select any particular setting, like "number of rows to skip=0, format=sql, sql compatibility mode: none" ?

Options: ReplyQuote
Re: SQL Problems during import: #1064 - You have an error in your SQL syntax
Posted by: RiggsFolly (---.as13285.net)
Date: August 13, 2013 02:07AM

Is it still giving the original 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 'SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */' at line 13

Options: ReplyQuote
Re: SQL Problems during import: #1064 - You have an error in your SQL syntax
Posted by: ChrisUCLA (---.socal.res.rr.com)
Date: August 13, 2013 02:13AM

Yes it is.

Options: ReplyQuote
Re: SQL Problems during import: #1064 - You have an error in your SQL syntax
Posted by: ChrisUCLA (---.socal.res.rr.com)
Date: August 13, 2013 03:58AM

I thought about dropped off code, and thought Id look match that first part with the engine code that fell off with a line that looked just like it:
) ENGINE = M-- MySQL dump 10.11
--
And changed it to:
) ENGINE=MyISAM DEFAULT CHARSET=utf8; <--added this, let the rest follow on next

-- MySQL dump 10.11
--
-- Host: localhost Database: fra1301704504244
-- ------------------------------------------------------
-- Server version 5.0.96-log

Re-iported that one and now it moved past that first error, and I now have 5 tables instead of 4, and a new

error:
SQL query:
INSERT INTO wp_commentmeta VALUES (1,2,'akismet_result','false'),(2,2,'akismet_history','a:4:{s:4:\"time\";d:1359068264.60383892059326171875;s:7:\"message\";s:28:\"Akismet cleared this comment\";s:5:\"event\";s:9:\"check-ham\";s:4:\"user\";s:0:\"\";}'),(4,2,'akismet_history','a:4:{s:4:\"time\";d:1359071391.7405779361724853515625;s:7:\"message\";s:47:\"fran9635 changed the comment status to approved\";s:5:\"event\";s:15:\"status-approved\";s:4:\"user\";s:8:\"fran9635\";}'),(5,3,'akismet_result','false'),(6,3,'akismet_history','a:4:{s:4:\"time\";d:1359071974.7687320709228515625;s:7:\"message\";s:28:\"Akismet cleared this comment\";s:5:\"event\";s:9:\"check-ham\";s:4:\"user\";s:8:\"fran9635\";}'),(83,30,'akismet_result','false'),(84,30,'akismet_history','a:4:{s:4:\"time\";d:1360971420.6763589382171630859375;s:7:\"message\";s:28:\"Akismet cleared this comment\";s:5:\"event\";s:9:\"check-ham\";s:4:\"user\";s:0:\"\";}'),(86,30,'akismet_history','a:4:{s:4:\"time\";d:1360971460.042884111404[...]

MySQL said:

#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 '0',
usage int(10) unsigned NOT NULL default '1',
PRIMARY KEY (refID)
) ' at line 1



Edited 1 time(s). Last edit at 08/13/2013 05:56AM by ChrisUCLA.

Options: ReplyQuote
Re: SQL Problems during import: #1064 - You have an error in your SQL syntax
Posted by: ChrisUCLA (---.socal.res.rr.com)
Date: August 13, 2013 06:37AM

oh, and for some reason the forum omitted all the backticks `

they are really there

Options: ReplyQuote
Re: SQL Problems during import: #1064 - You have an error in your SQL syntax
Posted by: RiggsFolly (---.ppp.as43234.net)
Date: August 13, 2013 09:19AM

It may be a good idea to either DROP all the tables from this database or DROP the database then re-create the database and start this restore again from scratch.

Options: ReplyQuote
Re: SQL Problems during import: #1064 - You have an error in your SQL syntax
Posted by: ChrisUCLA (---.socal.res.rr.com)
Date: August 13, 2013 06:18PM

Yah actually every time I edited ithe sql, I deleted the database and created a new one.

Options: ReplyQuote
Re: SQL Problems during import: #1064 - You have an error in your SQL syntax
Posted by: RiggsFolly (---.ppp.as43234.net)
Date: August 13, 2013 06:44PM

Do you still have a problem?

Options: ReplyQuote
Re: SQL Problems during import: #1064 - You have an error in your SQL syntax
Posted by: ChrisUCLA (---.socal.res.rr.com)
Date: August 13, 2013 08:58PM

Yes, still have that same error.

Error
SQL query:

INSERT INTO `wp_commentmeta` VALUES (1,2,'akismet_result','false'),(2,2,'akismet_history','a:4:{s:4:\"time\";d:1359068264.60383892059326171875;s:7:\"message\";s:28:\"Akismet cleared this comment\";s:5:\"event\";s:9:\"check-ham\";s:4:\"user\";s:0:\"\";}'),(4,2,'akismet_history','a:4:{s:4:\"time\";d:1359071391.7405779361724853515625;s:7:\"message\";s:47:\"fran9635 changed the comment status to approved\";s:5:\"event\";s:15:\"status-approved\";s:4:\"user\";s:8:\"fran9635\";}'),(5,3,'akismet_result','false'),(6,3,'akismet_history','a:4:{s:4:\"time\";d:1359071974.7687320709228515625;s:7:\"message\";s:28:\"Akismet cleared this comment\";s:5:\"event\";s:9:\"check-ham\";s:4:\"user\";s:8:\"fran9635\";}'),(83,30,'akismet_result','false'),(84,30,'akismet_history','a:4:{s:4:\"time\";d:1360971420.6763589382171630859375;s:7:\"message\";s:28:\"Akismet cleared this comment\";s:5:\"event\";s:9:\"check-ham\";s:4:\"user\";s:0:\"\";}'),(86,30,'akismet_history','a:4:{s:4:\"time\";d:1360971460.042884111404[...]

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 '0',
`usage` int(10) unsigned NOT NULL default '1',
PRIMARY KEY (`refID`)
) ' at line 1

Options: ReplyQuote
Re: SQL Problems during import: #1064 - You have an error in your SQL syntax
Posted by: RiggsFolly (---.ppp.as43234.net)
Date: August 14, 2013 10:05AM

We dont seem to be getting to the root of this problem. Would you like to try a TeamViewer session, so I can see first hand whats going on here. If so:



Install TeamViewer and I will troubleshoot for you.

Install TV, then run it.

Do this before attempting a connection.

How to Configure Team Viewer so it does not require port 80 or 443

Run TV
Extras -> Options -> Advanced -> Press the Advanced Button -> Advanced Network Connections

Check the checkbox saying [ Dont use incomming port 80 (recommended for web servers only ) ]
Stop and restart TV.

Then
Send me a Private Message containing the TV ID and PASSWORD so I can connect.
Leave TV running as it will change the password each time you restart it.

I am on UK time (GMT+1) and am normally available 09:00 - 16:00 and sometimes later into the evening.

Options: ReplyQuote


Sorry, only registered users may post in this forum.