PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Autres forums > Forum Programmation & Conception > comp.databases.mysql > Make a replica on a remote DB
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
Make a replica on a remote DB

Réponse
 
LinkBack Outils de la discussion
Vieux 05/01/2008, 14h54   #1
Dr. Fred on Vista
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Make a replica on a remote DB

Sometimes I have to make a replica on a remote mysql database... how can
I do? i tried with the backup utility but it will update also the
data... I only want the schema to be updated.
anyone can me? there's an utility to do it?
thanks
  Réponse avec citation
Vieux 05/01/2008, 16h59   #2
Luuk
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Make a replica on a remote DB


"Dr. Fred on Vista" <diealp@gmail.com> schreef in bericht
news:HSMfj.37278$8j3.12436@tornado.fastwebnet.it.. .
> Sometimes I have to make a replica on a remote mysql database... how can I
> do? i tried with the backup utility but it will update also the data... I
> only want the schema to be updated.
> anyone can me? there's an utility to do it?
> thanks


phpmyadmin
pick 'export'
and uncheck 'data'



  Réponse avec citation
Vieux 05/01/2008, 17h01   #3
Kees Nuyt
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Make a replica on a remote DB

On Sat, 05 Jan 2008 15:54:36 +0100, "Dr. Fred on Vista"
<diealp@gmail.com> wrote:

>Sometimes I have to make a replica on a remote mysql database... how can
>I do? i tried with the backup utility but it will update also the
>data... I only want the schema to be updated.
>anyone can me? there's an utility to do it?
>thanks


mysqldump --

Look for --no-data

Mysqldump is not a conversion utility that automagically
re-imports the data for you. It will not update the
schema, but rather create it, so you will loose the data.

If you :
1) backup the new schema with --no-data
2) backup the old schema with --no-data
3) backup the old data with --no-create-info
4) create the new schema w
5) execute the INSERTs in the dump from 3)
you may get your data back, if all unchanged column
definitions still have the same name.

Any new columns will be populated with their default
value, or with NULL if there is on default.

INSERTs will fail if there is a NOT NULL constraint on any
new columns.

INSERTs will also fail if columns have been deleted in the
new schema (relative to the old one).

HTH
--
( Kees
)
c[_] Acts speak louder than words. (#208)
  Réponse avec citation
Vieux 05/01/2008, 17h04   #4
Dr. Fred on Vista
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Make a replica on a remote DB

Kees Nuyt ha scritto:
> On Sat, 05 Jan 2008 15:54:36 +0100, "Dr. Fred on Vista"
> <diealp@gmail.com> wrote:
>
>> Sometimes I have to make a replica on a remote mysql database... how can
>> I do? i tried with the backup utility but it will update also the
>> data... I only want the schema to be updated.
>> anyone can me? there's an utility to do it?
>> thanks

>
> mysqldump --
>
> Look for --no-data
>
> Mysqldump is not a conversion utility that automagically
> re-imports the data for you. It will not update the
> schema, but rather create it, so you will loose the data.
>
> If you :
> 1) backup the new schema with --no-data
> 2) backup the old schema with --no-data
> 3) backup the old data with --no-create-info
> 4) create the new schema w
> 5) execute the INSERTs in the dump from 3)
> you may get your data back, if all unchanged column
> definitions still have the same name.
>
> Any new columns will be populated with their default
> value, or with NULL if there is on default.
>
> INSERTs will fail if there is a NOT NULL constraint on any
> new columns.
>
> INSERTs will also fail if columns have been deleted in the
> new schema (relative to the old one).
>
> HTH


thanks for the infos... I'll check this utility
bye
  Réponse avec citation
Vieux 05/01/2008, 17h06   #5
Dr. Fred on Vista
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Make a replica on a remote DB

Luuk ha scritto:
> "Dr. Fred on Vista" <diealp@gmail.com> schreef in bericht
> news:HSMfj.37278$8j3.12436@tornado.fastwebnet.it.. .
>> Sometimes I have to make a replica on a remote mysql database... how can I
>> do? i tried with the backup utility but it will update also the data... I
>> only want the schema to be updated.
>> anyone can me? there's an utility to do it?
>> thanks

>
> phpmyadmin
> pick 'export'
> and uncheck 'data'


i have to install phpmyadmin in my local machine... don't you know a
"normal" software?
  Réponse avec citation
Vieux 05/01/2008, 18h06   #6
Luuk
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Make a replica on a remote DB


"Dr. Fred on Vista" <diealp@gmail.com> schreef in bericht
news:WNOfj.37385$8j3.3827@tornado.fastwebnet.it...
> Luuk ha scritto:
>> "Dr. Fred on Vista" <diealp@gmail.com> schreef in bericht
>> news:HSMfj.37278$8j3.12436@tornado.fastwebnet.it.. .
>>> Sometimes I have to make a replica on a remote mysql database... how can
>>> I do? i tried with the backup utility but it will update also the
>>> data... I only want the schema to be updated.
>>> anyone can me? there's an utility to do it?
>>> thanks

>>
>> phpmyadmin
>> pick 'export'
>> and uncheck 'data'

>
> i have to install phpmyadmin in my local machine... don't you know a
> "normal" software?


phpmyadmin can be installed on the remote server (where mysql is installed)
and you did not specify which "backup utility" u use,
so i gave you this option, a lot of providers, who give access to MySQL,
also provide phpmyadmin
and i consider phpmyadmin to be "normal" software... ;-)




  Réponse avec citation
Vieux 05/01/2008, 18h28   #7
Dr. Fred on Vista
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Make a replica on a remote DB

Luuk ha scritto:
> "Dr. Fred on Vista" <diealp@gmail.com> schreef in bericht
> news:WNOfj.37385$8j3.3827@tornado.fastwebnet.it...
>> Luuk ha scritto:
>>> "Dr. Fred on Vista" <diealp@gmail.com> schreef in bericht
>>> news:HSMfj.37278$8j3.12436@tornado.fastwebnet.it.. .
>>>> Sometimes I have to make a replica on a remote mysql database... how can
>>>> I do? i tried with the backup utility but it will update also the
>>>> data... I only want the schema to be updated.
>>>> anyone can me? there's an utility to do it?
>>>> thanks
>>> phpmyadmin
>>> pick 'export'
>>> and uncheck 'data'

>> i have to install phpmyadmin in my local machine... don't you know a
>> "normal" software?

>
> phpmyadmin can be installed on the remote server (where mysql is installed)
> and you did not specify which "backup utility" u use,
> so i gave you this option, a lot of providers, who give access to MySQL,
> also provide phpmyadmin
> and i consider phpmyadmin to be "normal" software... ;-)


sorry... I didnt specified all (I'm not english, sorry)... I have a
local mysql DB (it's my test platform) and sometimes i have to update
the remote db schema to make it similar to the local one.
so, I dont think i can use phpmyadmin (installed on my hosting) to
read the local db.

thanks!


  Réponse avec citation
Vieux 05/01/2008, 22h58   #8
Kees Nuyt
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Make a replica on a remote DB

On Sat, 05 Jan 2008 18:01:13 +0100, Kees Nuyt
<k.nuyt@nospam.demon.nl> wrote:

Oops, I dropped some text there

>If you :
>1) backup the new schema with --no-data
>2) backup the old schema with --no-data
>3) backup the old data with --no-create-info
>4) create the new schema w


should be:
4) create the new schema with the dump off 1)

But you probably already figured that out.

>5) execute the INSERTs in the dump from 3)


Regards,
--
( Kees
)
c[_] I drink to make other people interesting. (#121)
  Réponse avec citation
Vieux 06/01/2008, 14h20   #9
Steve
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Make a replica on a remote DB


> sorry... I didnt specified all (I'm not english, sorry)... I have a
> local mysql DB (it's my test platform) and sometimes i have to update
> the remote db schema to make it similar to the local one.
> so, I dont think i can use phpmyadmin (installed on my hosting) to
> read the local db.
>
> thanks!


Depending on what platform your workstation is, you could check out
Navicat. I use that to manage all of the mysql databases I work with
and it does have a schema sync tool that gives you granularity as to
what tables / columns need to be synced. Not free, but well worth the
$99 (I think that's the price).

  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 14h04.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,16362 seconds with 17 queries