Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to compile MySQL Database in Windows

2025-01-30 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

How to compile MySQL database in Windows? for this problem, this article introduces the corresponding analysis and solution in detail, hoping to help more partners who want to solve this problem to find a more simple and easy way.

How to realize compiling MySQL Database under Windows

I. Environmental preparation:

1. Get the latest source code of MySQL: the current version is 5.1.44: http://dev.mysql.com/downloads/mysql/(Windows(x86,32-bit),ZIPArchive), and extract it to the working directory, such as C:/MySQL

two。 Install VS2008, any version is fine. In case of Express version, you must install WindowsSDK,Server2003R2PlatformSDK again at the download address: http://om/downloads/details.aspxFamilyId=F26B1AA4-741A-433A-9BE5-FA919850BDBF&displaylang=en

The VS2008Dev version is used here.

3. Install CMake (Windows version), download address: http://www.3gos.info/gongsi/564.html, the old version may not support the generation of VS2008 processing plan, push the latest version.

4. Install GNUWin32Bison, download address: http://gnuwin32.sourceforge.net/packages/bison.htm, the same installation path is good in English, and do not have spaces. Add the bin path to the system environment variable after installation.

5. Install CygWin and download it at http://om/setup.exe. Select the PerlandPython module when choosing the module.

How to realize compiling MySQL Database under Windows

II. Compile the source code:

1. The sql/sql_locale.cc file in the source directory includes localized languages, and the default UTF-8withoutBOM encoding is used.

two。 Control the console to go to the MySQL root directory and run the Win/configure.js script. The parameters of the script are:

WITH_INNOBASE_STORAGE_ENGINEEnableparticularstorageenginesWITH_PARTITION_STORAGE_ENGINEWITH_ARCHIVE_STORAGE_ENGINEWITH_BLACKHOLE_STORAGE_ENGINEWITH_EXAMPLE_STORAGE_ENGINEWITH_FEDERATED_STORAGE_ENGINE__NT__EnablenamedpipesupportMYSQL_SERVER_SUFFIX=< http://www.independence-mo.info/guanyuwomen/628.html;suffix>Serversuffix,defaultnoneCOMPILATION_COMMENT=Servercomment,default"Sourcedistribution"MYSQL_TCP_PORT=Serverport,default3306CYBOZUDefaultcharactersetisUTF8EMBED_MANIFESTSEmbedcustommanifestsintofinalexes,otherwiseVSdefaultwillbeused.(Note-ThisoptionshouldonlybeusedbyMySQLAB.)WITH_EMBEDDED_SERVERConfiguresolutiontoproducelibmysqld.dllandthestaticmysqlserver.lib

Therefore, the calling bank can be as follows.

Cscriptwin/configure.jsWITH_INNOBASE_STORAGE_ENGINEWITH_PARTITION_STORAGE_ENGINEMYSQL_SERVER_SUFFIX=-pro

The operation harvest should be similar to the following harvest:

> Microsoft (R) WindowsScriptHostVersionX.XCopyright (C) MicrosoftCorporationXXXX-XXXX.Allrightsreserved.done!

3. Create a VS processing plan with some batches in the MySQL source file Win directory:

Build-vs71.batVS2003

Build-vs8.batVS2005

Build-vs8_x64.batVS2005, compile 64bitMySQL

Build-vs9.batVS2008

Build-vs9_x64.batVS2008, compile 64bitMySQL

What is called within these batches is CMake, and you can type CMake at the call line to see the version of VS supported by CMake.

Here we use VS2008, and the target running platform is 32bit, so we run Win/build-vs9.bat.

After running, the MySql.sln is generated in the MySQL root directory, which is open with VS2008, and you can see that there are 56 projects.

4. Compile: choose the compilation form (such as Release), and then compile. Thousands of warnings are generated during compilation, all caused by the encoding of the source file (or because my Windows's current regional option is China), but negligently.

Reminding errorPRJ0019:Atoolreturnedanerrorcodefrom http://www.my9ti.info/jiaru/556.html"Generatingsql_yacc.h,sql_yacc.cc", during compilation is probably caused by spaces in the GNUWin32Bison path. You can see detailed error messages from the output window.

This is the answer to the question about how to compile the MySQL database in Windows. I hope the above content can be of some help to you. If you still have a lot of doubts to solve, you can follow the industry information channel for more related knowledge.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report