Learning Mysql


Upgrading an Existing MySQL Server | 71



Download 4.24 Mb.
View original pdf
Page69/366
Date04.08.2023
Size4.24 Mb.
#61806
1   ...   65   66   67   68   69   70   71   72   ...   366
Learning MySQL
Upgrading an Existing MySQL Server | 71

you should isolate or remove the old version so that there is no confusion about which program version is called when you type in a command.
To be able to revert to the older version of the MySQL server if the migration runs into problems, you can install the new server to a different directory from the default. Under
Linux and Mac OS X, you can also make a symbolic link to the directory containing the version you want to use. We discussed how to do this earlier in Installing MySQL
on Linux Using a gzipped Tar Archive from MySQL AB and Installing MySQL on
Linux by Compiling the Source Code from MySQL AB for the tarball and source installation methods under Linux, and in Installing Only MySQL Using the no-in- staller Package from MySQL AB fora local MySQL installation under Mac OS X. The
MySQL AB installer for Mac OS X creates this symbolic link automatically fora system- wide installation. Under Windows, you can specify a different installation directory during the installation process. It isn’t straightforward to have coexisting MySQL versions under Linux if you use RPM or Debian packages.
Steps to Upgrade an Existing MySQL Server
There are several ways to upgrade a server. Here, we look at a simple and reliable approach. We first save all the databases on the old server to a dump file. Next, we install the new server. Finally, we load the saved databases into the new server. This last step is not always necessary you can often get the new server to use the datafiles from the old one. To start, change directories to make the old MySQL installation directory your current working directory. Under Linux or Mac OS X, this is typically /usr/local/
mysql fora system-wide installation cd /usr/local/mysql
and
/mysql
fora local installation cd
/mysql

Under Windows, the MySQL server is typically installed under the
MySQL
directory
—for example, C:\Program Files\MySQL\MySQL Server 5.0:
C:\> cd C:\Program Files\MySQL\MySQL Server 5.0
Again, we’ll show the command-line instructions for Linux and Mac OS X under
Windows, simply replace the forward slash (/) with the backslash (\).
2. We discuss how to make a database dumps in detail in Chapter 10. You can dump all the databases on the old MySQL server to the file dump_of_all_data
bases_from_old_server.sql by typing (all on one line bin/mysqldump \

Download 4.24 Mb.

Share with your friends:
1   ...   65   66   67   68   69   70   71   72   ...   366




The database is protected by copyright ©ininet.org 2024
send message

    Main page