Solved

Downgrade MySQL Data from V5 to V3

Posted on 2006-11-23
2
364 Views
Last Modified: 2007-12-19
Hello,

The answer to this must be easy, but Im not having any luck finding it.

I need to extract a database from MySQL 5.0 using mysqldump command - then laod this dump into  MySQL 3.2.3.

The problem is I get some commands at the top of the dump which MySQL3 cannot understand. These are somrthing like:


/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;



I need to find a option to use which will stop mysqldump from creating this data.

So far I have tried:

--skip-opt
--skip-comments
--compatible=mysql323
--skip-triggers

Although the above does reduce some extra info I dont need, it does not remove the section I mentioned above.


Any ideas on how to do a very absoluted basic dump?

I only need to DROP IF EXISTS/CREATE/INSERT

Thanks
0
Comment
Question by:stuartc1
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 2

Author Comment

by:stuartc1
ID: 18002554
Forget it..... I have the answer.

mysqldump -uroot --compact --compatible=mysql323 --add-drop-table mydb > dump.sql

The order is important as is the --compact flag!!

Please Close this, thanks.
0
 
LVL 143

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 0 total points
ID: 18097277
question PAQed with points refunded
angelIII, page editor
0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Does the idea of dealing with bits scare or confuse you? Does it seem like a waste of time in an age where we all have terabytes of storage? If so, you're missing out on one of the core tools in every professional programmer's toolbox. Learn how to …
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question