1 (edited by bluedigitalmedia 2006-02-21 03:57)

Topic: HELP!!! How do I transition my Database from MySQL 4.1.9 to 5.0.3???

I am running into a major challenge here and I need someones help really bad.

My previous host provider more or less has just become too flaky and I needed to transition over to a new host provider - unfortunately, they have upgraded all ther MySQL databases to version 5 and I can't get my SQL data dump to populate the database fields.

I am getting the following Error every time I export it out.

This happens for each dtabase table:

"#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 '"forums_categories" (
  "id" int(10) unsigned NOT NULL,
  "cat_ "

I get something similar with each database table - What can I do???  I'm not a MYSQL guru.

sad

Re: HELP!!! How do I transition my Database from MySQL 4.1.9 to 5.0.3???

I actually resolved the issue - who would have known that an SQL data dump from MySQL 4.1.9 would have a one space syntax error on line 1 that MySQL 5.0.3 didn't like???

Re: HELP!!! How do I transition my Database from MySQL 4.1.9 to 5.0.3???

I've run into something similar once. Not fun smile

"Programming is like sex: one mistake and you have to support it for the rest of your life."

4 (edited by bluedigitalmedia 2006-02-21 16:59)

Re: HELP!!! How do I transition my Database from MySQL 4.1.9 to 5.0.3???

Well, the saga continues - it seems even with getting the database imported locally on the latest version of MySQL5 for Windows, the SQL dump and import to the web hosting server is still throwing the same #1064 Error in Syntax message - Now I know why I hate this kind of thing so much..

Here's what I am getting when trying to import the SQL dump to the host provider:

SQL query:

-- phpMyAdmin SQL Dump
-- version 2.7.0-pl2
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Feb 21, 2006 at 08:39 AM
-- Server version: 5.0.18
-- PHP Version: 5.1.2
--
-- Database: `uwdv_forums`
--
-- --------------------------------------------------------
--
-- Table structure for table `forums_bans`
--
CREATE TABLE `forums_bans` (
`id` int( 10 ) unsigned NOT NULL AUTO_INCREMENT ,
`username` varchar( 200 ) default NULL ,
`ip` varchar( 255 ) default NULL ,
`email` varchar( 50 ) default NULL ,
`message` varchar( 255 ) default NULL ,
`expire` int( 10 ) unsigned default NULL ,
PRIMARY KEY ( `id` )
) ENGINE = MYISAM DEFAULT CHARSET = latin1 AUTO_INCREMENT =1

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 'DEFAULT CHARSET=latin1 AUTO_INCREMENT=1' at line 27

I'm stumped as to what the Syntax error is - I can post a full SQL data dump but it is over 900K in size...

Re: HELP!!! How do I transition my Database from MySQL 4.1.9 to 5.0.3???

The error isn't in that code (assuming you haven't taken out any lines): that's the 24th line

6 (edited by bluedigitalmedia 2006-02-21 17:16)

Re: HELP!!! How do I transition my Database from MySQL 4.1.9 to 5.0.3???

ok - So I edited out the comments at the top and now I am getting the error message saying line 9 is the culprit:

CREATE TABLE `forums_bans` (
  `id` int(10) unsigned NOT NULL auto_increment,
  `username` varchar(200) default NULL,
  `ip` varchar(255) default NULL,
  `email` varchar(50) default NULL,
  `message` varchar(255) default NULL,
  `expire` int(10) unsigned default NULL,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

No other code has been deleted excpet for the rest of the SQL dump below this - I figure if this is the first one, it will be easier to trouble shoot any others thrown after this

Re: HELP!!! How do I transition my Database from MySQL 4.1.9 to 5.0.3???

Works fine for me

Re: HELP!!! How do I transition my Database from MySQL 4.1.9 to 5.0.3???

Ok - now I'm totally confused...  I wonder why it works for you but not me?

I was able to bring the database dump fine onto my local version of MySQL 5 running on my Windows based workstation.  I then dump the database back out and try to upload to the remote server - then I get the error message.

Is there anything specific I should be doing regarding the settings for the export of the database to make sure it will import on the remote server???

I'm about to give up - I have lost 2 days worth of work because I can't get this issue resolved.... sad

Re: HELP!!! How do I transition my Database from MySQL 4.1.9 to 5.0.3???

Remove these, had the problem plenty of times:

ENGINE=MyISAM DEFAULT CHARSET=latin1

Re: HELP!!! How do I transition my Database from MySQL 4.1.9 to 5.0.3???

Ok - I FINALLY figured out what was throwing the errors when trying to import into MySQL5 - it appears that any reference to "DEFAULT CHARSET=latin1" needs to be removed from the MySQL 4.1.x data dump if bringing the dump into MySQL 5

HTH anyone who runs into similar issues.

Re: HELP!!! How do I transition my Database from MySQL 4.1.9 to 5.0.3???

bluedigitalmedia wrote:

Ok - I FINALLY figured out what was throwing the errors when trying to import into MySQL5 - it appears that any reference to "DEFAULT CHARSET=latin1" needs to be removed from the MySQL 4.1.x data dump if bringing the dump into MySQL 5

HTH anyone who runs into similar issues.

Odd, I run MySQL 5 and it imported just fine :-/

Re: HELP!!! How do I transition my Database from MySQL 4.1.9 to 5.0.3???

I know - That was what I couldn't figure out...  It imported fine locally, but it didn't like it at all on the remote server - might be something particular to their server - who knows.. All I know is I'm glad this nightmare is over...

13

Re: HELP!!! How do I transition my Database from MySQL 4.1.9 to 5.0.3???

I had exactly that issue when importing a dump of PunBB that Rickard sent me into my local install of mysql (which was an older version) though I still have no idea why.

Re: HELP!!! How do I transition my Database from MySQL 4.1.9 to 5.0.3???

Oh the joys of ever changing web technology wink