DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

(mysql.info) windows-vc-plus-plus-build

Info Catalog (mysql.info) windows-source-build (mysql.info) windows-source-build (mysql.info) windows-bitkeeper-build
 
 2.8.6.1 Building MySQL Using VC++
 .................................
 
 * VC++ workspace files for MySQL 4.1 and above are compatible
 with Microsoft Visual Studio 2003 editions and tested by MySQL AB staff
 before each release.
 
 Follow this procedure to build MySQL:
 
   1. Create a work directory (for example, `C:\workdir').
 
   2. Unpack the source distribution in the aforementioned directory
      using `WinZip' or another Windows tool that can read `.zip' files.
 
   3. Start Visual Studio.
 
   4. From the File menu, select Open Workspace.
 
   5. Open the `mysql.dsw' workspace you find in the work directory.
 
   6. From the Build menu, select the Set Active Configuration menu.
 
   7. Click over the screen selecting mysqld - Win32 Debug and click OK.
 
   8. Press F7 to begin the build of the debug server, libraries, and
      some client applications.
 
   9. Compile the release version in the same way.
 
  10. Debug versions of the programs and libraries are placed in the
      `client_debug' and `lib_debug' directories. Release versions of
      the programs and libraries are placed in the `client_release' and
      `lib_release' directories. Note that if you want to build both
      debug and release versions, you can select the Build All option
      from the Build menu.
 
  11. Test the server. The server built using the preceding instructions
      expects that the MySQL base directory and data directory are
      `C:\mysql' and `C:\mysql\data' by default. If you want to test
      your server using the source tree root directory and its data
      directory as the base directory and data directory, you need to
      tell the server their pathnames.  You can either do this on the
      command line with the -basedir and -datadir options, or by placing
      appropriate options in an option file. (See  option-files.)
      If you have an existing data directory elsewhere that you want to
      use, you can specify its pathname instead.
 
  12. Start your server from the `client_release' or `client_debug'
      directory, depending on which server you want to use. The general
      server startup instructions are in  windows-installation.
      You must adapt the instructions appropriately if you want to use a
      different base directory or data directory.
 
  13. When the server is running in standalone fashion or as a service
      based on your configuration, try to connect to it from the `mysql'
      interactive command-line utility that exists in your
      `client_release' or `client_debug' directory.
 
 When you are satisfied that the programs you have built are working
 correctly, stop the server. Then install MySQL as follows:
 
   1. Create the directories where you want to install MySQL.  For
      example, to install into `C:\mysql', use these commands:
 
           C:\> mkdir C:\mysql
           C:\> mkdir C:\mysql\bin
           C:\> mkdir C:\mysql\data
           C:\> mkdir C:\mysql\share
           C:\> mkdir C:\mysql\scripts
 
      If you want to compile other clients and link them to MySQL, you
      should also create several additional directories:
 
           C:\> mkdir C:\mysql\include
           C:\> mkdir C:\mysql\lib
           C:\> mkdir C:\mysql\lib\debug
           C:\> mkdir C:\mysql\lib\opt
 
      If you want to benchmark MySQL, create this directory:
 
           C:\> mkdir C:\mysql\sql-bench
 
      Benchmarking requires Perl support. See  perl-support.
 
   2. From the `workdir' directory, copy into the `C:\mysql' directory
      the following directories:
 
           C:\> 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
 
 Set up and start the server in the same way as for the binary Windows
 distribution. See  windows-installation.
 
Info Catalog (mysql.info) windows-source-build (mysql.info) windows-source-build (mysql.info) windows-bitkeeper-build
automatically generated byinfo2html