When you are satisfied that the program you have built is working correctly, stop the server. Now you can install the distribution. There are two ways to do this, either by using the supplied installation script or by copying the files individually by hand.
To use the script method you must have Cygwin installed as the
script is a Shell script. To execute the installation process,
run the make_win_bin_dist script in the
scripts
directory of the MySQL source
distribution (see make_win_bin_dist). This
is a shell script, so you must have Cygwin installed if you
want to use it. It creates a Zip archive of the built
executables and support files that you can unpack to your
desired installation location.
It is also possible to install MySQL by copying directories and files manually:
Create the directories where you want to install MySQL.
For example, to install into
C:\mysql
, use these commands:
shell>mkdir C:\mysql
shell>mkdir C:\mysql\bin
shell>mkdir C:\mysql\data
shell>mkdir C:\mysql\share
shell>mkdir C:\mysql\scripts
If you want to compile other clients and link them to MySQL, you should also create several additional directories:
shell>mkdir C:\mysql\include
shell>mkdir C:\mysql\lib
shell>mkdir C:\mysql\lib\debug
shell>mkdir C:\mysql\lib\opt
If you want to benchmark MySQL, create this directory:
shell> mkdir C:\mysql\sql-bench
Benchmarking requires Perl support. See Perl Installation Notes.
From the work directory, copy into the
C:\mysql
directory the following
directories:
shell>cd \workdir
C:\workdir>copy client_release\*.exe C:\mysql\bin
C:\workdir>copy client_debug\mysqld.exe C:\mysql\bin\mysqld-debug.exe
C:\workdir>xcopy scripts\*.* C:\mysql\scripts /E
C:\workdir>xcopy share\*.* C:\mysql\share /E
If you want to compile other clients and link them to MySQL, you should also copy several libraries and header files:
C:\workdir>copy lib_debug\mysqlclient.lib C:\mysql\lib\debug
C:\workdir>copy lib_debug\libmysql.* C:\mysql\lib\debug
C:\workdir>copy lib_debug\zlib.* C:\mysql\lib\debug
C:\workdir>copy lib_release\mysqlclient.lib C:\mysql\lib\opt
C:\workdir>copy lib_release\libmysql.* C:\mysql\lib\opt
C:\workdir>copy lib_release\zlib.* C:\mysql\lib\opt
C:\workdir>copy include\*.h C:\mysql\include
C:\workdir>copy libmysql\libmysql.def C:\mysql\include
If you want to benchmark MySQL, you should also do this:
C:\workdir> xcopy sql-bench\*.* C:\mysql\bench /E
After installation, set up and start the server in the same way as for binary Windows distributions. See Installing MySQL on Windows.