Solved

Downgrade MySQL Data from V5 to V3

Posted on 2006-11-23
2
362 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
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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

Popularity Can Be Measured Sometimes we deal with questions of popularity, and we need a way to collect opinions from our clients.  This article shows a simple teaching example of how we might elect a favorite color by letting our clients vote for …
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 …
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

839 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