页面导航:首页 > 数据库 > Mysql > Linux下基于源码方式安装MySQL5.6


来源: 作者: 时间:2016-01-28 09:19 【




#安装介质,可以到以下网址安装介质,注意下载时选择source code,当前版本为5.6.17



Installation of MySQL from source requires several development tools. Some of these tools are needed no matter whether you use a standard source distribution or a development source tree. Other tool requirements depend on which installation method you use.

To install MySQL from source, your system must have the following tools, regardless of installation method:

CMake, which is used as the build framework on all platforms. CMake can be downloaded from good make program. Although some platforms come with their own make implementations, it is highly recommended that you use GNU make 3.75 or newer. It may already be available on your system as gmake. GNU make is available from working ANSI C++ compiler. GCC 4.2.1 or later, Sun Studio 12 or later, Visual Studio 2010 or later, and many current vendor-supplied compilers are known to work.Perl is needed if you intend to run test scripts. Most Unix-like systems include Perl. On Windows, you can use a version such as ActiveState Perl.





remove CMakeCache.txt and rerun cmake.On Debian/Ubuntu, package name is libncurses5-dev,

#如果cmake期间碰到上述错误,应该安装ncurses-devel rpm包,然后移除CMakeCache.txt


SZDB:/usr/local/src/_src/mysql-5.6.17 # rm -rf CMakeCache.txt

SZDB:/usr/local/src/mysql_src/mysql-5.6.17 # make

Linking CXX executable mysqltest_embedded

SZDB:/usr/local/src/mysql_src/mysql-5.6.17 # make install


SZDB:/usr/local/mysql # chown -R root .

#配置环境变量,通过软链或者修改环境变量实现(PATH=$PATH:/usr/local/mysql/bin/;export PATH)


Copyright (c) 2000, 2014, and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> show databases;



最 近 更 新
热 点 排 行