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 > Safe to move database files after installation?
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
Safe to move database files after installation?

Réponse
 
LinkBack Outils de la discussion
Vieux 11/02/2008, 06h18   #1
Jonathan Sachs
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Safe to move database files after installation?

I recently installed MySQL along with an application that uses it and
several other components that the application uses. To get everything
working I used the default configuration settings everywhere. Now I
am cleaning things up. I would like to move the database files to a
location outside the MySQL base directory.

Can I simply shut down MySQL, move the data directory, and point the
INI file's datadir directive to the new location? Or is it more
difficult than that?
  Réponse avec citation
Vieux 11/02/2008, 09h14   #2
Jeff Gaines
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Safe to move database files after installation?

On 11/02/2008 in message <8mpvq3tf28qgjll8s4k5af65ud8mh3bugj@4ax.com>
Jonathan Sachs wrote:

>Can I simply shut down MySQL, move the data directory, and point the
>INI file's datadir directive to the new location? Or is it more
>difficult than that?


I did that with no problems when I discovered the installer seemed to
ignore the data directory I told it to use.
I would stop MySQL and copy, rather than move, the files then rename the
old directory before re-starting MySQL. Gives you another bite at it if
there's a problem :-)

--
Jeff Gaines Damerham Hampshire UK
There is no reason anyone would want a computer in their home.
(Ken Olson, president Digital Equipment, 1977)
  Réponse avec citation
Vieux 11/02/2008, 14h13   #3
Peter H. Coffin
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Safe to move database files after installation?

On 11 Feb 2008 09:14:33 GMT, Jeff Gaines wrote:
> On 11/02/2008 in message <8mpvq3tf28qgjll8s4k5af65ud8mh3bugj@4ax.com>
> Jonathan Sachs wrote:
>
>>Can I simply shut down MySQL, move the data directory, and point the
>>INI file's datadir directive to the new location? Or is it more
>>difficult than that?

>
> I did that with no problems when I discovered the installer seemed to
> ignore the data directory I told it to use.
> I would stop MySQL and copy, rather than move, the files then rename the
> old directory before re-starting MySQL. Gives you another bite at it if
> there's a problem :-)


Take it a step further. Use mysqldump to take your first backup, then
restore from that.

--
Graham's First Rule of Internet Retailing:
If your 'shopping cart' site requires anything more complex than
HTML, SSL and a session , at least one of your competitors
will run a site which does not. Your competitor will get the sale.
  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 21h37.


É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,09688 seconds with 11 queries