1.2.1 Major Directories: BUILD

转载自:https://dev.mysql.com/doc/internals/en/guided-tour-majordir-build.html


The first major directory we'll look at is BUILD. It actually has very little in it, but it's useful, because one of the first things you might want to do with the source code is: compile and link it.

The example command line that we could use is

shell> ./BUILD/compile-pentium-debug --prefix=$HOME/mysql-bin

It invokes a batch file in the BUILD directory. When it's done, you'll have an executable MySQL server and client.

Or, um, well, maybe you won't. Sometimes people have trouble with this step because there's something missing in their operating system version, or whatever. Don't worry, it really does work, and there are people around who might help you if you have trouble with this step. Search for "build" in the archives of lists.mysql.com.

We, when we're done building, tend to install it with the following sequence:

shell> make
shell> make install
shell> $HOME/mysql-bin/scripts/mysql_install_db \
 --basedir=$HOME/mysql-bin \
 --datadir=$HOME/mysql-bin/var

This puts the new MySQL installation files on

shell> $HOME/mysql-bin/bin          -- for the server
shell> $HOME/mysql-bin/bin          -- for the mysql client
shell> $HOME/mysql-bin/var          -- for the databases

Before MySQL 5.5, mysql_install_db is located in the bin directory and the server is located in the libexec directory.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值