Jump to content

Import accross versions


javelin

Recommended Posts

I'm trying to transfer a db from a host which is giving me severe ftp problems to another host.

 

However the server versions are different and I think this is giving me problems.

 

The host I want to transfer from is using 4.1.20

The host I want to import to is using 4.0

 

Each time I try and import I get,

(#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 '"1"' at line 1)

Link to comment
Share on other sites

let me answer your question with several other questons:

 

Are you using a mysql_dump method to generate an SQL file on the old server?

What are you using to generate this SQL file?

What are you using to import the SQL on the new server?

Can you post some (or all) of the SQL file that you are trying to import?

Link to comment
Share on other sites

I used the export function in myphpadmin to dump.

I used the inport function of myphpadmin on the new host.

 

The header of the dump from the old server is,

-- phpMyAdmin SQL Dump

-- version 2.10.1

-- http://www.phpmyadmin.net

--

-- Host: localhost

-- Generation Time: Feb 21, 2008 at 12:09 AM

-- Server version: 4.1.20

-- PHP Version: 5.1.6

 

SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";

 

--

-- Database: `micromagic_info_-_eng`

--

And for comparison the header from the new server using a db that is working fine, is,

-- phpMyAdmin SQL Dump

-- version 2.6.4-pl3

-- http://www.phpmyadmin.net

--

-- Host: infongd11966

-- Generation Time: Feb 26, 2008 at 02:45 PM

-- Server version: 4.0.27

-- PHP Version: 4.3.10-200.schlund.1

--

-- Database: `db232583975`

--

CREATE DATABASE `db232583975`;

USE db232583975;

 

Looking at the different versions its just a shame that the old host just does not have sufficient bandwidth.

Link to comment
Share on other sites

Thanks, I tried that before and still got no joy see below.

 

There is a chance that you may have found a bug in the SQL parser. Please examine your query closely, and check that the quotes are correct and not mis-matched. Other possible failure causes may be that you are uploading a file with binary outside of a quoted text area. You can also try your query on the MySQL command line interface. The MySQL server error output below, if there is any, may also help you in diagnosing the problem. If you still have problems or if the parser fails where the command line interface succeeds, please reduce your SQL query input to the single query that causes problems, and submit a bug report with the data chunk in the CUT section below:

----BEGIN CUT----

eNqdkN9umzAUxu95inNRqYkEDpBAUku7YClLo0LCgHbKVTDBXZDAMGzy59l6sUfaK8yOmqqbdjXL

tuzvnO/8fOzH8TrGMLdgbkPgrzBYYIPjWlqSSv1V0+bPCYabZYGB/6ha0nHaoarMUbtv9QPYaOyC

bZrOyJzJKY/YtrFlQUXrO/BPLdxo4Tn5GmCYIBPZU4MLwgrSFdpTEsM60cFb+KtUh2df8r6VDJY+

TJGpRaGHZXkXTYy2GmvRQ6RS9HWiKo2RZRoSi/huX/WsQBYEJetPWuCtFhgoM0reGLOZc2fIThT9

1+tPwwD56PDsFbXESBXu+7rVpHygHS8bJnGWiSyl7IVo8Wh0PB5Vo/WZKA9iVKigWg8NFxiqZkeq

vTwqaUEZ7YhQhdKyphi+0BxsV1f/MwMiwHSw7UAUquSEdpJ6JaueLGSbKnLp9Co7Una1K/SeCJIT

LktnRW6P3bHtTt1JdgmrzfjP8Q5ISV5R4KLrd6LvKLw0HYiLlpGeb7c5YVXJxRtxHvte6kPqfQ78

vxJgoAFkb7dt2WZwIN1uT7qBZZpDWK1TWD0FART0hfSVgNtb/aPh8t0Z8JpUVcnEwBlCz3j5ndHi

H17zT3NHCW+kW5TsLOhJvDtUVhQvQy/ewKO/ARh8fOFQG0K6ifxP4XmZeOFvXVLfhQ==

----END CUT----

----BEGIN RAW----

 

ERROR: C1 C2 LEN: 1 2 561

STR: »

 

CVS: $Id: sqlparser.lib.php,v 2.36 2005/08/08 20:22:11 lem9 Exp $

MySQL: 4.0.27-standard

USR OS, AGENT, VER: Win IE 7.0

PMA: 2.6.4-pl3

PHP VER,OS: 4.3.10-200.schlund.1 Linux

LANG: en-iso-8859-1

SQL: -- phpMyAdmin SQL Dump

-- version 2.10.1

-- http://www.phpmyadmin.net

--

-- Host: localhost

-- Generation Time: Feb 26, 2008 at 05:25 PM

-- Server version: 4.1.20

-- PHP Version: 5.1.6

 

--

-- Database: `db236326764`

--

 

-- --------------------------------------------------------

 

--

-- Table structure for table `aus__banlist`

--

 

CREATE TABLE `aus__banlist` (

  `banlist_ip` varchar(100) NOT NULL default '',

  `banlist_admin` smallint(5) unsigned NOT NULL default '0',

  `banlist_reason` tinytext NOT NULL,

  PRIMARY KEY  (`banlist_ip`)

) TYPE=MyISAM----END RAW----

SQL query:

 

-- phpMyAdmin SQL Dump -- version 2.10.1 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Feb 26, 2008 at 05:25 PM -- Server version: 4.1.20 -- PHP Version: 5.1.6 -- -- Database: `db236326764` -- -- -------------------------------------------------------- -- -- Table structure for table `aus__banlist` -- CREATE TABLE `aus__banlist` ( `banlist_ip` varchar(100) NOT NULL default '', `banlist_admin` smallint(5) unsigned NOT NULL default '0', `banlist_reason` tinytext NOT NULL, PRIMARY KEY (`banlist_ip`) ) TYPE=MyISAM

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 '-- phpMyAdmin SQL Dump

-- version 2.10.1

-- http://www.phpmy

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.