![]() ![]() |
|
![]() ![]() ![]() ![]() |
|
![]() |
![]() 4.16.4 Mise à jour vers une autre architecture
If you are using MySQL 3.23, you can copy the
The MySQL data `*.ISD' and the index files `*.ISM'
files) are architecture-dependent and in some case OS-dependent. If you
want to move your applications to another machine that has a different
architecture or OS than your current machine, you should not try to move
a database by simply copying the files to the other machine. Use
By default,
Try The easiest (although not the fastest) way to move a database between two machines is to run the following commands on the machine on which the database is located: shell> mysqladmin -h 'other hostname' create nom_base_de_donnees shell> mysqldump --opt nom_base_de_donnees \ | mysql -h 'other hostname' nom_base_de_donnees If you want to copy a database from a remote machine over a slow network, you can use: shell> mysqladmin create nom_base_de_donnees shell> mysqldump -h 'other hostname' --opt --compress nom_base_de_donnees \ | mysql nom_base_de_donnees You can also store the result in a file, then transfer the file to the target machine and load the file into the database there. For example, you can dump a database to a file on the source machine like this: shell> mysqldump --quick nom_base_de_donnees | gzip > nom_base_de_donnees.contents.gz (The file created in this example is compressed.) Transfer the file containing the database contents to the target machine and run these commands there: shell> mysqladmin create nom_base_de_donnees shell> gunzip < nom_base_de_donnees.contents.gz | mysql nom_base_de_donnees
You can also use First, create the directory for the output files and dump the database: shell> mkdir DUMPDIR shell> mysqldump --tab=DUMPDIR nom_base_de_donnees
Then transfer the files in the shell> mysqladmin create nom_base_de_donnees # create database shell> cat DUMPDIR/*.sql | mysql nom_base_de_donnees # create tables in database shell> mysqlimport nom_base_de_donnees DUMPDIR/*.txt # load data into tables
Also, don't forget to copy the
After you import the |