•To unpack a compressed tar  file, tar  can uncompress and unpack the distribution if it has z  option support: 

shell> tar zxvf mysql- VERSION .tar.gz 

If your tar  does not have z  option support, use gunzip  to unpack the distribution and tar  to unpack it: 

## Configure the Distribution 

shell> gunzip < mysql- VERSION .tar.gz | tar xvf - 

Alternatively, CMake  can uncompress and unpack the distribution: 

shell> cmake -E tar zxvf mysql- VERSION .tar.gz 

•To unpack a Zip archive, use WinZip  or another tool that can read .zip  files. 

Unpacking the distribution file creates a directory named mysql- VERSION . 

Change location into the top-level directory of the unpacked distribution: 

shell> cd mysql- VERSION 

Build outside of the source tree to keep the tree clean. If the top-level source directory is named mysql- src  under your current working directory, you can build in a directory named bld  at the same level. Create the directory and go there: 

shell> mkdir bld shell> cd bld 

Configure the build directory. The minimum configuration command includes no options to override configuration defaults: 

shell> cmake ../mysql-src 

The build directory needs not be outside the source tree. For example, you can build in a directory named bld  under the top-level source tree. To do this, starting with mysql-src  as your current working directory, create the directory bld  and then go there: 

shell> mkdir bld shell> cd bld 

Configure the build directory. The minimum configuration command includes no options to override configuration defaults: 

shell> cmake .. 

If you have multiple source trees at the same level (for example, to build multiple versions of MySQL), the second strategy can be advantageous. The first strategy places all build directories at the same level, which requires that you choose a unique name for each. With the second strategy, you can use the same name for the build directory within each source tree. The following instructions assume this second strategy. 

On Windows, specify the development environment. For example, the following commands configure MySQL for 32-bit or 64-bit builds, respectively: 

shell> cmake .. -G "Visual Studio 12 2013" shell> cmake .. -G "Visual Studio 12 2013 Win64" 

On macOS, to use the Xcode IDE: 

shell> cmake .. -G Xcode 

