473,511 Members | 14,134 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Controlling output of mysqldump 10.9

My client is using a shared server running MySQL 2.4, however the in
house server is 4.1.12 with mysqldump 10.9. Is there a way to have the
10.9 version output a format that is fully compatible with 2.4?

Some of the CREATE TABLE statements in 10.9 are not accepted by 2.4.

Currently, I am not using any of the switches in creating the output
file other than the -u, -h and -p.

Todd
Nov 23 '05 #1
6 5955
You're running MySQL 2.4? Are you really sure? I've never heared anything
about MySQL versions prior to 3.x.x - I don't even know anything about the
history (and you could call that history) of MySQL < 3.

That would really astonish me a lot.

Markus
Nov 23 '05 #2
>My client is using a shared server running MySQL 2.4, however the in

*WHAT* is running MySQL 2.4 (client or server), and what is
that the version of? If that's the version of mysqld, that's
ancient, ancient software. If it's the version of the client,
well, the client version is rarely related to what SQL syntax
is accepted.

It is probably better to refer to the distribution version that
it came with (mysqldump --version or mysql --version will tell
you that, at least recent ones will).
house server is 4.1.12 with mysqldump 10.9. Is there a way to have the
10.9 version output a format that is fully compatible with 2.4?

Some of the CREATE TABLE statements in 10.9 are not accepted by 2.4.
mysqldump 10.10 (distribution version 5.0.15), which I'm running
currently, has the option --compatible which can limit the features
in created SQL for the dump. Consider --compatible no_table_options
or --compatible mysql323 . I believe the --compatible option is
not new but to use it you need mysqld 4.1.0 or later, which you have.
Currently, I am not using any of the switches in creating the output
file other than the -u, -h and -p.


Gordon L. Burditt
Nov 23 '05 #3
Todd Cary wrote:
My client is using a shared server running MySQL 2.4, however the in
house server is 4.1.12 with mysqldump 10.9. Is there a way to have the
10.9 version output a format that is fully compatible with 2.4?
Are you sure you've got that right? I've never seen MySQL version 2.4.
I can't find any release announcement for MySQL 2.4. The
announcements archive on mysql.com goes back to the beginning of 2000,
and that's for MySQL version 3.22. If your client is running MySQL 2.4,
that's incredibly old, and there are probably no guarantees of
compatibility.
Some of the CREATE TABLE statements in 10.9 are not accepted by 2.4.


The specific statements, and error messages, would be required for a
diagnosis and recommended solution.

I'd recommend that you read the options to mysqldump at
http://dev.mysql.com/doc/refman/4.1/en/mysqldump.html
You might try "--compatible=ansi" for instance.

Any other solution is likely to require a custom text-processing script
to modify the mysqldump output and remove incompatible elements. Perl
is a good language for tasks like this.

Regards,
Bill K.
Nov 23 '05 #4
My mistake! That is the version of phpMyAdmin.

This is the destination server.
# phpMyAdmin MySQL-Dump
# version 2.4.0
# http://www.phpmyadmin.net/ (download page)
#
# Host: 10.0.11.23
# Generation Time: Nov 13, 2005 at 09:09 AM
# Server version: 4.0.24 <-----------------<<<
# PHP Version: 4.3.2
# Database : `sfyc`
# --------------------------------------------------------

The other header is

This is the source server.

-- MySQL dump 10.9
--
-- Host: localhost Database: sfyc
-- ------------------------------------------------------
-- Server version 4.1.12 <--------<<<

/*!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 */;
/*!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 */;

Which lines should I uncomment?

Todd
Todd Cary wrote:
My client is using a shared server running MySQL 2.4, however the in
house server is 4.1.12 with mysqldump 10.9. Is there a way to have the
10.9 version output a format that is fully compatible with 2.4?

Some of the CREATE TABLE statements in 10.9 are not accepted by 2.4.

Currently, I am not using any of the switches in creating the output
file other than the -u, -h and -p.

Todd

Nov 23 '05 #5
This syntax:
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;


usually takes care that the code is compatible with any server version. For
example, this line of code is valid for MySQL > 4.1.1, so it is marked with
/*!40101 ... */ that means that the line will be ignored for MySQL versions
below 4.1.1.

As far as I have experienced, mysqldump manages that absolutely great that
you can use a dump file from any version for any other version.

Markus
Nov 23 '05 #6
So, you've got source server: 4.1.12, destination server: 4.0.24

** /*!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 */;
!! /*!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 */;
Which lines should I uncomment?


The destination server should ignore anything with a version over
40024 (since it's version 4.0.24). The lines marked above with **
should be ignored, and the lines marked with !! should be executed.
You can leave all of these lines alone.

But you said it was the CREATE TABLE statements that were being
rejected, but didn't show one that was. You should run mysqldump
with --compatible mysql40 for transferring from 4.1.12 to 4.0.24 .

Gordon L. Burditt
Nov 23 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
2598
by: Mangina | last post by:
Hello all. Can anyone see why this snippet of code isnt dumping the databases using mysqldump ? All the credentials are correct (changed for the purpose of this post). $host = "localhost";...
7
7396
by: Adam Smith | last post by:
Hope this is the right news group!! I did a server upgrade and at the same time did a mysql update from 4.0.12 to Ver 12.22 Distrib 4.0.16 mach1# mysql --version mysql Ver 12.22 Distrib...
0
2250
by: mcstayinskool | last post by:
I'm trying to dump a bugzilla installation to a file, then restore it to a different database name (so as to test my db backup system). I use mysqldump to dump it to a file: # mysqldump -u root...
1
4665
by: Greg.Harabedian | last post by:
I'll start off by saying I am using MySQL v4.0 and my question is...how do I get mysqldump to dump the actual binary values store in a blob? Here is an example: -- Create a test table create...
6
30075
by: Robert Blackwell | last post by:
I want to make a scheduled task in windows to do a mysqldump. Someone gave me this .bat to run but I'm not able to get it to work. REM @echo off for /f "tokens=1" %%i in ('date /t') do set...
6
6148
by: Antoni | last post by:
Hello, I'm trying to make a daily database backup. When executing "mysqldump - uxxx -pxxx database /home/backup/ddbb.sql -q &" the httpd server gets blocked and my site is "offline" for 30...
1
3666
by: John Pye | last post by:
Hi all I am trying to set up a python script to manage backups of a mysql database the 'right way' using pipes. I want to send the output of the 'mysqldump' command to a file. Using a normal...
0
2912
by: Pratchaya | last post by:
How can i dump (mysqldump) with skip query logging ? Now, when i run mysqldump. mysql log ( query log ) default running/keeping all in result mysqldump. It's possible ? to run mysqldump...
7
4707
by: damezumari | last post by:
I use Windows XP and Apache. I am trying to backup a database on my local computer with the following php code: $dbname = 'ol'; $dbhost = 'localhost'; $dbuser = 'root'; $dbpass =...
0
7349
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7417
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7074
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5659
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5063
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4734
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3219
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3210
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1572
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.