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 MySQLon 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 ServerThere 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/mysqland
/mysql fora local installation
cd
/mysqlUnder 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.0Again, 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_databases_from_old_server.sql by typing (all on one line
bin/mysqldump \Share with your friends: