Jump to content


Photo

MySql 5 export for MySql 4


  • Please log in to reply
4 replies to this topic

#1 neugi

neugi
  • Members
  • PipPipPip
  • Advanced Member
  • 63 posts

Posted 07 August 2006 - 02:15 PM

Hi,

i try to export a table from my mysql server to place it than on the MySql Server of my Client.

after i exported the table for MySql4, there is no auto_increment for any of the fields.

if i export the script normal without telling my server that i'll use the dump for an MySql4 server the auto_increment will be exported.

my server:
-- phpMyAdmin SQL Dump
-- version 2.8.0.3
-- Server Version: 5.0.20
-- PHP-Version: 5.1.2

client server:
-- phpMyAdmin SQL Dump
-- version 2.8.1
-- Server Version: 4.0.12
-- PHP-Version: 4.3.10

maybe  somebody can help me, otherwise i've to add this by hand.

thx

#2 fenway

fenway
  • Staff Alumni
  • MySQL Si-Fu / PHP Resident Alien
  • 16,199 posts
  • LocationToronto, ON

Posted 07 August 2006 - 04:15 PM

It shouldn't matter -- the auto_increment value will be ok anyway.
Seriously... if people don't start reading this before posting, I'm going to consider not answering at all.

#3 wildteen88

wildteen88
  • Staff Alumni
  • Advanced Member
  • 10,482 posts
  • LocationUK, Bournemouth

Posted 07 August 2006 - 04:20 PM

If you are exporting a MySQL5 database in phpMyAdmin to MYSQL4. Make sure when you are in the export page (by clicking the Export tab at top of the page for your database). That the SQL export compatibility option is set to MySQL40 and that the Add AUTO_INCREMENT value checkbox is checked.

#4 neugi

neugi
  • Members
  • PipPipPip
  • Advanced Member
  • 63 posts

Posted 08 August 2006 - 08:04 AM

Hi,

export with standard settings:

CREATE TABLE `sprache` (
  `id` int(11) NOT NULL auto_increment,
  `ger` text collate latin1_general_ci NOT NULL,
  `eng` text collate latin1_general_ci NOT NULL,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci COMMENT='texte für die homepage' AUTO_INCREMENT=29 ;

export with settings for mysql 4:
CREATE TABLE `sprache` (
  `id` int(11) NOT NULL,
  `ger` text NOT NULL,
  `eng` text NOT NULL,
  PRIMARY KEY  (`id`)
) TYPE=MyISAM COMMENT='texte für die homepage' AUTO_INCREMENT=29 ;

at the field there is missing the auto_increment statement. the value ist exported at both. Ive also tried to check every checkbox and export but the auto_increment is still missing.

still got the problem


#5 fenway

fenway
  • Staff Alumni
  • MySQL Si-Fu / PHP Resident Alien
  • 16,199 posts
  • LocationToronto, ON

Posted 08 August 2006 - 02:24 PM

Oh... I thought you meant the value, not the actual attribute to the field itself... I've never seen that before.
Seriously... if people don't start reading this before posting, I'm going to consider not answering at all.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users