Upgrading MySQL on Windows
87
[mysqld]
# set basedir to your installation path
basedir=E:/mysql
# set datadir to the location of your data directory
datadir=D:/MySQLdata
Note that Windows path names are specified in option files using (forward) slashes rather than
backslashes. If you do use backslashes, double them:
[mysqld]
# set basedir to your installation path
basedir=C:\\Program Files\\MySQL\\MySQL Server 5.0
# set datadir to the location of your data directory
datadir=D:\\MySQLdata
The rules for use of backslash in option file values are given in
Section 4.2.3.3, “Using Option Files”
.
If you change the
datadir
value in your MySQL configuration file, you must move the contents of
the existing MySQL data directory before restarting the MySQL server.
See
Section 2.10.4.2, “Creating an Option File”
.
• If you reinstall or upgrade MySQL without first stopping and removing the existing MySQL service
and install MySQL using the MySQL Configuration Wizard, you may see this error:
Error: Cannot create Windows service for MySql. Error: 0
This occurs when the Configuration Wizard tries to install the service and finds an existing service
with the same name.
One solution to this problem is to choose a service name other than
mysql
when using the
configuration wizard. This enables the new service to be installed correctly, but leaves the outdated
service in place. Although this is harmless, it is best to remove old services that are no longer in use.
To permanently remove the old
mysql
service, execute the following command as a user with
administrative privileges, on the command-line:
shell>
sc delete mysql
[SC] DeleteService SUCCESS
If the
sc
utility is not available for your version of Windows, download the
delsrv
utility from
http://
www.microsoft.com/windows2000/techinfo/reskit/tools/existing/delsrv-o.asp
and use the
delsrv
mysql
syntax.
2.10.6. Upgrading MySQL on Windows
This section lists some of the steps you should take when upgrading MySQL on Windows.
1. Review
Section 2.19.1, “Upgrading MySQL”
, for additional information on upgrading MySQL that is
not specific to Windows.
2. You should always back up your current MySQL installation before performing an upgrade. See
Section 7.2, “Database Backup Methods”
.
3. Download the latest Windows distribution of MySQL from
http://dev.mysql.com/downloads/
.
4. Before upgrading MySQL, you must stop the server. If the server is installed as a service, stop the
service with the following command from the command prompt:
shell>
NET STOP MySQL
If you are not running the MySQL server as a service, use
mysqladmin
to stop it. For example,
before upgrading from MySQL 4.1 to 5.0, use
mysqladmin
from MySQL 4.1 as follows:
Summary of Contents for 5.0
Page 1: ...MySQL 5 0 Reference Manual ...
Page 18: ...xviii ...
Page 60: ...40 ...
Page 396: ...376 ...
Page 578: ...558 ...
Page 636: ...616 ...
Page 844: ...824 ...
Page 1234: ...1214 ...
Page 1427: ...MySQL Proxy Scripting 1407 ...
Page 1734: ...1714 ...
Page 1752: ...1732 ...
Page 1783: ...Configuring Connector ODBC 1763 ...
Page 1793: ...Connector ODBC Examples 1773 ...
Page 1839: ...Connector Net Installation 1819 2 You must choose the type of installation to perform ...
Page 2850: ...2830 ...
Page 2854: ...2834 ...
Page 2928: ...2908 ...
Page 3000: ...2980 ...
Page 3122: ...3102 ...
Page 3126: ...3106 ...
Page 3174: ...3154 ...
Page 3232: ...3212 ...