Building MySQL 4.1.21
Building a Web Server, for Windows
Requirements
- Microsoft Visual C++ 6.0 SP5 with Processor Pack[Will not build correctly with Visual Studio .NET]
Download
- Home : http://www.mysql.com/
- Package(win32 source) : mysql-4.1.21-win-src.zip
- Unpack as ...\mysql-4.1.20
Original Instructions
- Mysql.com Documentation: Building MySQL Using VC++
Our Configuration
- Install to : C:\www\mysql
Build Instructions
Note that during the build process a new libmysql.dll will be placed under %SystemRoot%\system32 (C:\WINNT\system32, C:\Windows\system32)
- Delete the current %SystemRoot%\system32\libmysql.dll
Visual C++ Workspace IDE Build Instructions
mysql.dsw is the Visual Studio Workspace which exposes the entire list of working .dsp projects that are required to build MySQL.
- Load mysql.dsw
- From the Build menu, select 'Set Active Configuration'...
Select 'mysqld-Win32 Debug', Build
Select 'mysqld-Win32 Release', Build
Select 'mysqld-Win32 nt', Build
Select 'mysqld-Win32 Max', Build
Select 'mysqld-Win32 Max nt', Build - Or -- From the Build menu, select 'Batch Build...', de-select all but the above, Build
Installation
The build process does not copy the directories nor the files to the installation location -- this has to be done manually.
> mkdir C:\www\mysql- Move the following directories from the build directory (...\mysql-4.1.21) to the new C:\www\mysql directory...
client_release
client_debug
lib_release
lib_debug
include
share
data - Rename and/or move the following directories within the C:\www\mysql structure...
Rename client_release to bin
Move client_debug under bin
Rename lib_release to lib
Move lib_debug under lib - Copy ...\mysql-4.1.21\libmysql\libmysql.def to the C:\www\mysql\include directory
- Copy ...\mysql-4.1.21\support-files\*.* to the C:\www\mysql directory
Setup
- Copy your choice of C:\www\mysql\xxx.ini (my-medium.ini) to your %SystemRoot% directory (C:\WINNT).
- Edit file %SystemRoot%\my.ini, section [mysqld], insert...
basedir = C:/www/mysql/
datadir = C:/www/mysql/data/ - Edit [client] and [mysqld] sections -
socket = C:/www/tmp/mysql.sock[Make sure to create directory C:/www/tmp]

