时间:2021-07-01 10:21:17 帮助过:6人阅读
系统平台:CentOS 7.2
MySQL版本:mysql-5.6.31
安装方式:源码编译
导航1. 下载源码包
2. 解压源码包、安装依赖包
3. 编译安装mysql
4. 安装后配置,包括CentOS 7服务配置
5. my.cnf配置举例
6. mysqld.service配置举例
1. 下载源码包
wget http://dev.mysql.com/get/Downloads/MySQL-5.6/mysql-5.6.31.tar.gz
2. 解压源码包、安装依赖包
tar xf mysql-5.6.31.tar.gz yum install -y libarchive cmake libstdc++-devel gcc-c++ libxml2-devel tcp_wrappers-devel ibasan libasan-static libtsan libtsan-static perl-Data-Dumper m4 bison
3. 编译安装mysql
cd mysql-5.6.31/ cmake -DCMAKE_INSTALL_PREFIX=/usr/local/mysql5.6 -DMYSQL_DATADIR=/var/mysql_db -DWITH_INNOBASE_STORAGE_ENGINE=1 -DWITH_ARCHIVE_STORAGE_ENGINE=1 -DWITH_BLACKHOLE_STORAGE_ENGINE=1 -DWITH_PERFSCHEMA_STORAGE_ENGINE=1 -DWITH_EXAMPLE_STORAGE_ENGINE=1 -DWITH_FEDERATED_STORAGE_ENGINE=1 -DWITH_PARTITION_STORAGE_ENGINE=1 -DMYSQL_UNIX_ADDR=/var/lib/mysql/mysql.sock -DENABLED_LOCAL_INFILE=1 -DINSTALL_MANDIR=/usr/share/man -DDEFAULT_CHARSET=utf8 -DDEFAULT_COLLATION=utf8_general_ci -DWITH_ASAN=1 -DWITH_DEBUG=1 -DWITH_LIBWRAP=1 . -LH // 这里也可以使用ccmake 基于命令行GUI的方式来安装,ccmake后面也是使用 -D***=1 的参数 (可选)ccmake -DCMAKE_INSTALL_PREFIX=/usr/local/mysql5.6 -DMYSQL_DATADIR=/var/mysql_db -DWITH_INNOBASE_STORAGE_ENGINE=1 -DWITH_ARCHIVE_STORAGE_ENGINE=1 -DWITH_BLACKHOLE_STORAGE_ENGINE=1 -DWITH_PERFSCHEMA_STORAGE_ENGINE=1 -DWITH_EXAMPLE_STORAGE_ENGINE=1 -DWITH_FEDERATED_STORAGE_ENGINE=1 -DWITH_PARTITION_STORAGE_ENGINE=1 -DMYSQL_UNIX_ADDR=/var/lib/mysql/mysql.sock -DENABLED_LOCAL_INFILE=1 -DINSTALL_MANDIR=/usr/share/man -DDEFAULT_CHARSET=utf8 -DDEFAULT_COLLATION=utf8_general_ci -DWITH_ASAN=1 -DWITH_DEBUG=1 -DWITH_LIBWRAP=1 .
cmake执行完过后由于有 -LH 参数,所以最后会显示各项功能开启状态,你需要自己检查下是否和自己配置参数一样。
-- Running cmake version 2.8.11 -- Could NOT find Git (missing: GIT_EXECUTABLE) -- Looking for SHM_HUGETLB -- Looking for SHM_HUGETLB - found -- Looking for sys/types.h -- Looking for sys/types.h - found -- Looking for stdint.h -- Looking for stdint.h - found -- Looking for stddef.h -- Looking for stddef.h - found -- Check size of void * -- Check size of void * - done -- MySQL 5.6.31 -- Packaging as: mysql-5.6.31-Linux-x86_64 -- Performing Test HAVE_C_FSANITIZE -- Performing Test HAVE_C_FSANITIZE - Success -- Performing Test HAVE_CXX_FSANITIZE -- Performing Test HAVE_CXX_FSANITIZE - Success -- Performing Test HAVE_LLVM_LIBCPP -- Performing Test HAVE_LLVM_LIBCPP - Failed -- Looking for floor -- Looking for floor - not found -- Looking for floor in m -- Looking for floor in m - found -- Looking for gethostbyname_r -- Looking for gethostbyname_r - found -- Looking for bind -- Looking for bind - found -- Looking for crypt -- Looking for crypt - not found -- Looking for crypt in crypt -- Looking for crypt in crypt - found -- Looking for setsockopt -- Looking for setsockopt - found -- Looking for dlopen -- Looking for dlopen - not found -- Looking for dlopen in dl -- Looking for dlopen in dl - found -- Looking for sched_yield -- Looking for sched_yield - found -- Looking for clock_gettime -- Looking for clock_gettime - found -- Looking for include file pthread.h -- Looking for include file pthread.h - found -- Looking for pthread_create -- Looking for pthread_create - not found -- Looking for pthread_create in pthreads -- Looking for pthread_create in pthreads - not found -- Looking for pthread_create in pthread -- Looking for pthread_create in pthread - found -- Found Threads: TRUE -- Performing Test HAVE_LIBWRAP -- Performing Test HAVE_LIBWRAP - Success -- Looking for 4 include files stdlib.h, ..., float.h -- Looking for 4 include files stdlib.h, ..., float.h - found -- Looking for include file alloca.h -- Looking for include file alloca.h - found -- Looking for include file aio.h -- Looking for include file aio.h - found -- Looking for include file arpa/inet.h -- Looking for include file arpa/inet.h - found -- Looking for include file crypt.h -- Looking for include file crypt.h - found -- Looking for include file cxxabi.h -- Looking for include file cxxabi.h - not found -- Looking for include file dirent.h -- Looking for include file dirent.h - found -- Looking for include file dlfcn.h -- Looking for include file dlfcn.h - found -- Looking for include file execinfo.h -- Looking for include file execinfo.h - found -- Looking for include file fcntl.h -- Looking for include file fcntl.h - found -- Looking for include file fenv.h -- Looking for include file fenv.h - found -- Looking for include file float.h -- Looking for include file float.h - found -- Looking for include file floatingpoint.h -- Looking for include file floatingpoint.h - not found -- Looking for include file fpu_control.h -- Looking for include file fpu_control.h - found -- Looking for include file grp.h -- Looking for include file grp.h - found -- Looking for include file ieeefp.h -- Looking for include file ieeefp.h - not found -- Looking for include file inttypes.h -- Looking for include file inttypes.h - found -- Looking for include file langinfo.h -- Looking for include file langinfo.h - found -- Looking for include file limits.h -- Looking for include file limits.h - found -- Looking for include file locale.h -- Looking for include file locale.h - found -- Looking for include file malloc.h -- Looking for include file malloc.h - found -- Looking for include file memory.h -- Looking for include file memory.h - found -- Looking for include file ndir.h -- Looking for include file ndir.h - not found -- Looking for include file netinet/in.h -- Looking for include file netinet/in.h - found -- Looking for include file paths.h -- Looking for include file paths.h - found -- Looking for include file port.h -- Looking for include file port.h - not found -- Looking for include file poll.h -- Looking for include file poll.h - found -- Looking for include file pwd.h -- Looking for include file pwd.h - found -- Looking for include file sched.h -- Looking for include file sched.h - found -- Looking for include file select.h -- Looking for include file select.h - not found -- Looking for include file semaphore.h -- Looking for include file semaphore.h - found -- Looking for include files sys/types.h, sys/dir.h -- Looking for include files sys/types.h, sys/dir.h - found -- Looking for include file sys/ndir.h -- Looking for include file sys/ndir.h - not found -- Looking for include file sys/pte.h -- Looking for include file sys/pte.h - not found -- Looking for include file stdlib.h -- Looking for include file stdlib.h - found -- Looking for include file strings.h -- Looking for include file strings.h - found -- Looking for include file string.h -- Looking for include file string.h - found -- Looking for include file synch.h -- Looking for include file synch.h - not found -- Looking for include file sysent.h -- Looking for include file sysent.h - not found -- Looking for include file sys/cdefs.h -- Looking for include file sys/cdefs.h - found -- Looking for include file sys/file.h -- Looking for include file sys/file.h - found -- Looking for include file sys/fpu.h -- Looking for include file sys/fpu.h - not found -- Looking for include file sys/ioctl.h -- Looking for include file sys/ioctl.h - found -- Looking for include file sys/ipc.h -- Looking for include file sys/ipc.h - found -- Looking for include file sys/malloc.h -- Looking for include file sys/malloc.h - not found -- Looking for include file sys/mman.h -- Looking for include file sys/mman.h - found -- Looking for include file sys/prctl.h -- Looking for include file sys/prctl.h - found -- Looking for include file sys/resource.h -- Looking for include file sys/resource.h - found -- Looking for include file sys/select.h -- Looking for include file sys/select.h - found -- Looking for include file sys/shm.h -- Looking for include file sys/shm.h - found -- Looking for include file sys/socket.h -- Looking for include file sys/socket.h - found -- Looking for include file sys/stat.h -- Looking for include file sys/stat.h - found -- Looking for include file sys/stream.h -- Looking for include file sys/stream.h - not found -- Looking for include file sys/termcap.h -- Looking for include file sys/termcap.h - not found -- Looking for include files time.h, sys/timeb.h -- Looking for include files time.h, sys/timeb.h - found -- Looking for include files curses.h, term.h -- Looking for include files curses.h, term.h - found -- Looking for include file asm/termbits.h -- Looking for include file asm/termbits.h - found -- Looking for include file termbits.h -- Looking for include file termbits.h - not found -- Looking for include file termios.h -- Looking for include file termios.h - found -- Looking for include file termio.h -- Looking for include file termio.h - found -- Looking for include file termcap.h -- Looking for include file termcap.h - found -- Looking for include file unistd.h -- Looking for include file unistd.h - found -- Looking for include file utime.h -- Looking for include file utime.h - found -- Looking for include file varargs.h -- Looking for include file varargs.h - not found -- Looking for include file sys/time.h -- Looking for include file sys/time.h - found -- Looking for include file sys/utime.h -- Looking for include file sys/utime.h - not found -- Looking for include file sys/wait.h -- Looking for include file sys/wait.h - found -- Looking for include file sys/param.h -- Looking for include file sys/param.h - found -- Looking for include file sys/vadvise.h -- Looking for include file sys/vadvise.h - not found -- Looking for include file fnmatch.h -- Looking for include file fnmatch.h - found -- Looking for include file stdarg.h -- Looking for include file stdarg.h - found -- Looking for include files stdlib.h, sys/un.h -- Looking for include files stdlib.h, sys/un.h - found -- Looking for include file vis.h -- Looking for include file vis.h - not found -- Looking for include file wchar.h -- Looking for include file wchar.h - found -- Looking for include file wctype.h -- Looking for include file wctype.h - found -- Looking for include file sasl/sasl.h -- Looking for include file sasl/sasl.h - not found -- Looking for include file sys/devpoll.h -- Looking for include file sys/devpoll.h - not found -- Looking for include file signal.h -- Looking for include file signal.h - found -- Looking for include file sys/devpoll.h -- Looking for include file sys/devpoll.h - not found -- Looking for include file sys/epoll.h -- Looking for include file sys/epoll.h - found -- Looking for include file sys/event.h -- Looking for include file sys/event.h - not found -- Looking for include file sys/queue.h -- Looking for include file sys/queue.h - found -- Looking for TAILQ_FOREACH -- Looking for TAILQ_FOREACH - found -- Looking for include file sys/ptem.h -- Looking for include file sys/ptem.h - not found -- Performing Test HAVE_WERROR_FLAG -- Performing Test HAVE_WERROR_FLAG - Success -- Performing Test HAVE_PTHREAD_ONCE_INIT -- Performing Test HAVE_PTHREAD_ONCE_INIT - Success -- Looking for _aligned_malloc -- Looking for _aligned_malloc - not found -- Looking for _aligned_free -- Looking for _aligned_free - not found -- Looking for aio_read -- Looking for aio_read - not found -- Looking for alarm -- Looking for alarm - found -- Looking for backtrace -- Looking for backtrace - found -- Looking for backtrace_symbols -- Looking for backtrace_symbols - found -- Looking for backtrace_symbols_fd -- Looking for backtrace_symbols_fd - found -- Looking for printstack -- Looking for printstack - not found -- Looking for bmove -- Looking for bmove - not found -- Looking for bsearch -- Looking for bsearch - found -- Looking for index -- Looking for index - found -- Looking for clock_gettime -- Looking for clock_gettime - found -- Looking for cuserid -- Looking for cuserid - found -- Looking for directio -- Looking for directio - not found -- Looking for _doprnt -- Looking for _doprnt - not found -- Looking for flockfile -- Looking for flockfile - found -- Looking for ftruncate -- Looking for ftruncate - found -- Looking for getline -- Looking for getline - found -- Looking for compress -- Looking for compress - not found -- Looking for crypt -- Looking for crypt - found -- Looking for dlerror -- Looking for dlerror - found -- Looking for dlopen -- Looking for dlopen - found -- Looking for fchmod -- Looking for fchmod - found -- Looking for fcntl -- Looking for fcntl - found -- Looking for fconvert -- Looking for fconvert - not found -- Looking for fdatasync -- Looking for fdatasync - found -- Looking for fdatasync -- Looking for fdatasync - found -- Looking for fedisableexcept -- Looking for fedisableexcept - found -- Looking for fpsetmask -- Looking for fpsetmask - not found -- Looking for fseeko -- Looking for fseeko - found -- Looking for fsync -- Looking for fsync - found -- Looking for getcwd -- Looking for getcwd - found -- Looking for gethostbyaddr_r -- Looking for gethostbyaddr_r - found -- Looking for gethrtime -- Looking for gethrtime - not found -- Looking for getnameinfo -- Looking for getnameinfo - found -- Looking for getpass -- Looking for getpass - found -- Looking for getpassphrase -- Looking for getpassphrase - not found -- Looking for getpwnam -- Looking for getpwnam - found -- Looking for getpwuid -- Looking for getpwuid - found -- Looking for getrlimit -- Looking for getrlimit - found -- Looking for getrusage -- Looking for getrusage - found -- Looking for getwd -- Looking for getwd - found -- Looking for gmtime_r -- Looking for gmtime_r - found -- Looking for initgroups -- Looking for initgroups - found -- Looking for issetugid -- Looking for issetugid - not found -- Looking for getuid -- Looking for getuid - found -- Looking for geteuid -- Looking for geteuid - found -- Looking for getgid -- Looking for getgid - found -- Looking for getegid -- Looking for getegid - found -- Looking for ldiv -- Looking for ldiv - found -- Looking for localtime_r -- Looking for localtime_r - found -- Looking for longjmp -- Looking for longjmp - found -- Looking for lstat -- Looking for lstat - found -- Looking for madvise -- Looking for madvise - found -- Looking for malloc_info -- Looking for malloc_info - found -- Looking for memcpy -- Looking for memcpy - found -- Looking for memmove -- Looking for memmove - found -- Looking for mkstemp -- Looking for mkstemp - found -- Looking for mlock -- Looking for mlock - found -- Looking for mlockall -- Looking for mlockall - found -- Looking for mmap -- Looking for mmap - found -- Looking for mmap64 -- Looking for mmap64 - found -- Looking for perror -- Looking for perror - found -- Looking for poll -- Looking for poll - found -- Looking for port_create -- Looking for port_create - not found -- Looking for posix_fallocate -- Looking for posix_fallocate - found -- Looking for posix_memalign -- Looking for posix_memalign - found -- Looking for pread -- Looking for pread - found -- Looking for pthread_attr_create -- Looking for pthread_attr_create - not found -- Looking for pthread_attr_getguardsize -- Looking for pthread_attr_getguardsize - found -- Looking for pthread_attr_getstacksize -- Looking for pthread_attr_getstacksize - found -- Looking for pthread_attr_setscope -- Looking for pthread_attr_setscope - found -- Looking for pthread_attr_setstacksize -- Looking for pthread_attr_setstacksize - found -- Looking for pthread_condattr_create -- Looking for pthread_condattr_create - not found -- Looking for pthread_condattr_setclock -- Looking for pthread_condattr_setclock - found -- Looking for pthread_key_delete -- Looking for pthread_key_delete - found -- Looking for pthread_rwlock_rdlock -- Looking for pthread_rwlock_rdlock - found -- Looking for pthread_sigmask -- Looking for pthread_sigmask - found -- Looking for pthread_threadmask -- Looking for pthread_threadmask - not found -- Looking for pthread_yield_np -- Looking for pthread_yield_np - not found -- Looking for putenv -- Looking for putenv - found -- Looking for readdir_r -- Looking for readdir_r - found -- Looking for readlink -- Looking for readlink - found -- Looking for re_comp -- Looking for re_comp - found -- Looking for regcomp -- Looking for regcomp - found -- Looking for realpath -- Looking for realpath - found -- Looking for rename -- Looking for rename - found -- Looking for rwlock_init -- Looking for rwlock_init - not found -- Looking for sched_yield -- Looking for sched_yield - found -- Looking for setenv -- Looking for setenv - found -- Looking for setlocale -- Looking for setlocale - found -- Looking for setfd -- Looking for setfd - not found -- Looking for sigaction -- Looking for sigaction - found -- Looking for sigthreadmask -- Looking for sigthreadmask - not found -- Looking for sigwait -- Looking for sigwait - found -- Looking for sigaddset -- Looking for sigaddset - found -- Looking for sigemptyset -- Looking for sigemptyset - found -- Looking for sighold -- Looking for sighold - found -- Looking for sigset -- Looking for sigset - found -- Looking for sleep -- Looking for sleep - found -- Looking for snprintf -- Looking for snprintf - found -- Looking for stpcpy -- Looking for stpcpy - found -- Looking for strcoll -- Looking for strcoll - found -- Looking for strerror -- Looking for strerror - found -- Looking for strlcpy -- Looking for strlcpy - not found -- Looking for strnlen -- Looking for strnlen - found -- Looking for strlcat -- Looking for strlcat - not found -- Looking for strsignal -- Looking for strsignal - found -- Looking for fgetln -- Looking for fgetln - not found -- Looking for strpbrk -- Looking for strpbrk - found -- Looking for strsep -- Looking for strsep - found -- Looking for strstr -- Looking for strstr - found -- Looking for strtok_r -- Looking for strtok_r - found -- Looking for strtol -- Looking for strtol - found -- Looking for strtoll -- Looking for strtoll - found -- Looking for strtoul -- Looking for strtoul - found -- Looking for strtoull -- Looking for strtoull - found -- Looking for strcasecmp -- Looking for strcasecmp - found -- Looking for strncasecmp -- Looking for strncasecmp - found -- Looking for strdup -- Looking for strdup - found -- Looking for shmat -- Looking for shmat - found -- Looking for shmctl -- Looking for shmctl - found -- Looking for shmdt -- Looking for shmdt - found -- Looking for shmget -- Looking for shmget - found -- Looking for tell -- Looking for tell - not found -- Looking for tempnam -- Looking for tempnam - found -- Looking for thr_setconcurrency -- Looking for thr_setconcurrency - not found -- Looking for thr_yield -- Looking for thr_yield - not found -- Looking for vasprintf -- Looking for vasprintf - found -- Looking for vsnprintf -- Looking for vsnprintf - found -- Looking for vprintf -- Looking for vprintf - found -- Looking for valloc -- Looking for valloc - found -- Looking for memalign -- Looking for memalign - found -- Looking for chown -- Looking for chown - found -- Looking for nl_langinfo -- Looking for nl_langinfo - found -- Looking for ntohll -- Looking for ntohll - not found -- Looking for clock_gettime -- Looking for clock_gettime - found -- Looking for epoll_create -- Looking for epoll_create - found -- Looking for epoll_ctl -- Looking for epoll_ctl - found -- Looking for inet_ntop -- Looking for inet_ntop - found -- Looking for kqueue -- Looking for kqueue - not found -- Looking for kqueue -- Looking for kqueue - not found -- Looking for signal -- Looking for signal - found -- Looking for timeradd -- Looking for timeradd - found -- Looking for timerclear -- Looking for timerclear - found -- Looking for timercmp -- Looking for timercmp - found -- Looking for timerisset -- Looking for timerisset - found -- Looking for include file time.h -- Looking for include file time.h - found -- Looking for include file sys/times.h -- Looking for include file sys/times.h - found -- Looking for include file asm/msr.h -- Looking for include file asm/msr.h - found -- Looking for include file ia64intrin.h -- Looking for include file ia64intrin.h - not found -- Looking for times -- Looking for times - found -- Looking for gettimeofday -- Looking for gettimeofday - found -- Looking for read_real_time -- Looking for read_real_time - not found -- Looking for ftime -- Looking for ftime - found -- Looking for time -- Looking for time - found -- Looking for rdtscll -- Looking for rdtscll - not found -- Looking for madvise -- Looking for madvise - found -- Looking for tzname -- Looking for tzname - found -- Looking for lrand48 -- Looking for lrand48 - found -- Looking for getpagesize -- Looking for getpagesize - found -- Looking for TIOCGWINSZ -- Looking for TIOCGWINSZ - found -- Looking for FIONREAD -- Looking for FIONREAD - found -- Looking for TIOCSTAT -- Looking for TIOCSTAT - not found -- Looking for FIONREAD -- Looking for FIONREAD - not found -- Looking for finite -- Looking for finite - found -- Looking for log2 -- Looking for log2 - found -- Looking for isnan -- Looking for isnan - found -- Looking for rint -- Looking for rint - found -- Performing Test HAVE_ISINF -- Performing Test HAVE_ISINF - Success -- Performing Test HAVE_FESETROUND -- Performing Test HAVE_FESETROUND - Success -- Check if the system is big endian -- Searching 16 bit integer -- Check size of unsigned short -- Check size of unsigned short - done -- Using unsigned short -- Check if the system is big endian - little endian -- Check size of u_int32_t -- Check size of u_int32_t - done -- Check size of int64 -- Check size of int64 - failed -- Check size of uint64 -- Check size of uint64 - failed -- Check size of time_t -- Check size of time_t - done -- Check size of struct timespec -- Check size of struct timespec - done -- Check size of bool -- Check size of bool - failed -- Check size of socklen_t -- Check size of socklen_t - done -- Performing Test TIME_T_UNSIGNED -- Performing Test TIME_T_UNSIGNED - Failed -- Performing Test HAVE_GETADDRINFO -- Performing Test HAVE_GETADDRINFO - Success -- Performing Test HAVE_SELECT -- Performing Test HAVE_SELECT - Success -- Performing Test HAVE_TIMESPEC_TS_SEC -- Performing Test HAVE_TIMESPEC_TS_SEC - Failed -- Performing Test QSORT_TYPE_IS_VOID -- Performing Test QSORT_TYPE_IS_VOID - Success -- Performing Test HAVE_SOCKET_SIZE_T_AS_socklen_t -- Performing Test HAVE_SOCKET_SIZE_T_AS_socklen_t - Success -- Performing Test HAVE_PTHREAD_YIELD_ZERO_ARG -- Performing Test HAVE_PTHREAD_YIELD_ZERO_ARG - Success -- Checking stack direction : -1 -- Performing Test SIGNAL_RETURN_TYPE_IS_VOID -- Performing Test SIGNAL_RETURN_TYPE_IS_VOID - Success -- Looking for include files time.h, sys/time.h -- Looking for include files time.h, sys/time.h - found -- Looking for O_NONBLOCK -- Looking for O_NONBLOCK - found -- Performing Test C_HAS_inline -- Performing Test C_HAS_inline - Success -- Performing Test HAVE_PAUSE_INSTRUCTION -- Performing Test HAVE_PAUSE_INSTRUCTION - Success -- Looking for tcgetattr -- Looking for tcgetattr - found -- Performing Test HAVE_POSIX_SIGNALS -- Performing Test HAVE_POSIX_SIGNALS - Success -- Performing Test HAVE_BSS_START -- Performing Test HAVE_BSS_START - Success -- Performing Test HAVE_WEAK_SYMBOL -- Performing Test HAVE_WEAK_SYMBOL - Success -- Performing Test HAVE_SOLARIS_STYLE_GETHOST -- Performing Test HAVE_SOLARIS_STYLE_GETHOST - Failed -- Performing Test HAVE_GCC_ATOMIC_BUILTINS -- Performing Test HAVE_GCC_ATOMIC_BUILTINS - Success -- Looking for netinet/in6.h -- Looking for netinet/in6.h - not found -- Check size of struct sockaddr_in6 -- Check size of struct sockaddr_in6 - done -- Check size of struct in6_addr -- Check size of struct in6_addr - done -- Performing Test HAVE_SOCKADDR_STORAGE_SS_FAMILY -- Performing Test HAVE_SOCKADDR_STORAGE_SS_FAMILY - Success -- Performing Test HAVE_SOCKADDR_IN_SIN_LEN -- Performing Test HAVE_SOCKADDR_IN_SIN_LEN - Failed -- Performing Test HAVE_SOCKADDR_IN6_SIN6_LEN -- Performing Test HAVE_SOCKADDR_IN6_SIN6_LEN - Failed -- Performing Test STRUCT_DIRENT_HAS_D_INO -- Performing Test STRUCT_DIRENT_HAS_D_INO - Success -- Performing Test STRUCT_DIRENT_HAS_D_NAMLEN -- Performing Test STRUCT_DIRENT_HAS_D_NAMLEN - Failed -- Looking for include file numaif.h -- Looking for include file numaif.h - not found -- Performing Test HAVE_VISIBILITY_HIDDEN -- Performing Test HAVE_VISIBILITY_HIDDEN - Success -- HAVE_VISIBILITY_HIDDEN -- HAVE_VISIBILITY_HIDDEN -- HAVE_VISIBILITY_HIDDEN -- Check size of mbstate_t -- Check size of mbstate_t - done -- Performing Test HAVE_LANGINFO_CODESET -- Performing Test HAVE_LANGINFO_CODESET - Success -- Looking for mbrlen -- Looking for mbrlen - found -- Looking for mbscmp -- Looking for mbscmp - not found -- Looking for mbsrtowcs -- Looking for mbsrtowcs - found -- Looking for wcrtomb -- Looking for wcrtomb - found -- Looking for mbrtowc -- Looking for mbrtowc - found -- Looking for wcscoll -- Looking for wcscoll - found -- Looking for wcsdup -- Looking for wcsdup - found -- Looking for wcwidth -- Looking for wcwidth - found -- Looking for wctype -- Looking for wctype - found -- Looking for iswlower -- Looking for iswlower - found -- Looking for iswupper -- Looking for iswupper - found -- Looking for towlower -- Looking for towlower - found -- Looking for towupper -- Looking for towupper - found -- Looking for iswctype -- Looking for iswctype - found -- Check size of wchar_t -- Check size of wchar_t - done -- Check size of wctype_t -- Check size of wctype_t - done -- Check size of wint_t -- Check size of wint_t - done -- Found Curses: /usr/lib64/libcurses.so -- Looking for tputs in /usr/lib64/libcurses.so -- Looking for tputs in /usr/lib64/libcurses.so - found -- Performing Test HAVE_DECL_TGOTO -- Performing Test HAVE_DECL_TGOTO - Success -- Looking for strvis -- Looking for strvis - not found -- Looking for strunvis -- Looking for strunvis - not found -- Performing Test HAVE_WVLA -- Performing Test HAVE_WVLA - Success -- Looking for include file libaio.h -- Looking for include file libaio.h - not found -- Looking for io_queue_init in aio -- Looking for io_queue_init in aio - not found -- Looking for sched_getcpu -- Looking for sched_getcpu - found -- Performing Test HAVE_IB_GCC_ATOMIC_BUILTINS -- Performing Test HAVE_IB_GCC_ATOMIC_BUILTINS - Success -- Performing Test HAVE_IB_GCC_ATOMIC_BUILTINS_BYTE -- Performing Test HAVE_IB_GCC_ATOMIC_BUILTINS_BYTE - Success -- Performing Test HAVE_IB_GCC_ATOMIC_BUILTINS_64 -- Performing Test HAVE_IB_GCC_ATOMIC_BUILTINS_64 - Success -- Performing Test HAVE_IB_GCC_SYNC_SYNCHRONISE -- Performing Test HAVE_IB_GCC_SYNC_SYNCHRONISE - Success -- Performing Test HAVE_IB_GCC_ATOMIC_THREAD_FENCE -- Performing Test HAVE_IB_GCC_ATOMIC_THREAD_FENCE - Success -- Performing Test HAVE_IB_GCC_ATOMIC_TEST_AND_SET -- Performing Test HAVE_IB_GCC_ATOMIC_TEST_AND_SET - Success -- Performing Test HAVE_IB_ATOMIC_PTHREAD_T_GCC -- Performing Test HAVE_IB_ATOMIC_PTHREAD_T_GCC - Success -- Looking for asprintf -- Looking for asprintf - found -- Check size of pthread_t -- Check size of pthread_t - done -- Using cmake version 2.8.11 -- Not building NDB -- Performing Test HAVE_PEERCRED -- Performing Test HAVE_PEERCRED - Success -- Library mysqlclient depends on OSLIBS -lpthread;m;dl -- Googlemock was not found. gtest-based unit tests will be disabled. You can run cmake . -DENABLE_DOWNLOADS=1 to automatically download and build required components from source. -- If you are inside a firewall, you may need to use an http proxy: export http_proxy=http://example.com:80 -- Library mysqlserver depends on OSLIBS -lpthread;m;wrap;crypt;dl -- CMAKE_BUILD_TYPE: Debug -- COMPILE_DEFINITIONS: HAVE_CONFIG_H -- CMAKE_C_FLAGS: -fPIC -Wall -Wextra -Wformat-security -Wvla -Wwrite-strings -Wdeclaration-after-statement -Werror -- CMAKE_CXX_FLAGS: -fPIC -Wall -Wextra -Wformat-security -Wvla -Woverloaded-virtual -Wno-unused-parameter -Werror -- CMAKE_C_FLAGS_DEBUG: -g -fabi-version=2 -fno-omit-frame-pointer -fno-strict-aliasing -fsanitize=address -O1 -Wno-error -fPIC -DENABLED_DEBUG_SYNC -DSAFE_MUTEX -- CMAKE_CXX_FLAGS_DEBUG: -g -fabi-version=2 -fno-omit-frame-pointer -fno-strict-aliasing -fsanitize=address -O1 -Wno-error -fPIC -DENABLED_DEBUG_SYNC -DSAFE_MUTEX -- Configuring done -- Generating done -- Build files have been written to: /root/mysql-5.6.31 -- Cache values // Choose the type of build, options are: None(CMAKE_CXX_FLAGS or CMAKE_C_FLAGS used) Debug Release RelWithDebInfo MinSizeRel CMAKE_BUILD_TYPE:STRING=Debug // CXX compiler. CMAKE_CXX_COMPILER:FILEPATH=/usr/bin/c++ // C compiler. CMAKE_C_COMPILER:FILEPATH=/usr/bin/cc // Install path prefix, prepended onto install directories. CMAKE_INSTALL_PREFIX:PATH=/usr/local/mysql5.6 // Set to true if this is a community build COMMUNITY_BUILD:BOOL=ON // Enable profiling ENABLED_PROFILING:BOOL=ON // Enable debug sync (debug builds only) ENABLE_DEBUG_SYNC:BOOL=ON // Download and build 3rd party source code components, e.g. google mock ENABLE_DOWNLOADS:BOOL=OFF // Enable gcov (debug, Linux builds only) ENABLE_GCOV:BOOL=OFF // Enable gprof (optimized, Linux builds only) ENABLE_GPROF:BOOL=OFF // Enable SASL on InnoDB Memcached ENABLE_MEMCACHED_SASL:BOOL=OFF // Enable SASL on InnoDB Memcached ENABLE_MEMCACHED_SASL_PWDB:BOOL=OFF // Selection of features. Options are - xsmall : - small: embedded - classic: embedded + archive + federated + blackhole - large : embedded + archive + federated + blackhole + innodb - xlarge: embedded + archive + federated + blackhole + innodb + partition - community: all features (currently == xlarge) FEATURE_SET:STRING=community // Installation directory layout. Options are: STANDALONE (as in zip or tar.gz installer), RPM, DEB, SVR4 INSTALL_LAYOUT:STRING=STANDALONE // default MySQL data directory MYSQL_DATADIR:PATH=/var/mysql_db // MySQL maintainer-specific development environment MYSQL_MAINTAINER_MODE:BOOL=ON // Support tracing of Optimizer OPTIMIZER_TRACE:BOOL=ON // PATH to MySQL TMP dir. Defaults to the P_tmpdir macro in <stdio.h> TMPDIR:PATH=P_tmpdir // Link ARCHIVE statically to the server WITH_ARCHIVE_STORAGE_ENGINE:BOOL=ON // Enable address sanitizer WITH_ASAN:BOOL=1 // Link BLACKHOLE statically to the server WITH_BLACKHOLE_STORAGE_ENGINE:BOOL=ON // Use dbug/safemutex WITH_DEBUG:BOOL=1 // Use flags from cmake/build_configurations/compiler_options.cmake WITH_DEFAULT_COMPILER_OPTIONS:BOOL=ON // Use feature set in cmake/build_configurations/feature_set.cmake WITH_DEFAULT_FEATURE_SET:BOOL=ON // By default use bundled editline WITH_EDITLINE:STRING=bundled // Compile MySQL with embedded server WITH_EMBEDDED_SERVER:BOOL=ON // Generate shared version of embedded library (in addition to the static one) WITH_EMBEDDED_SHARED_LIBRARY:BOOL=OFF // WITH_EXAMPLE_STORAGE_ENGINE:BOOL=1 // Options are: none, complex, all WITH_EXTRA_CHARSETS:STRING=all // Link FEDERATED statically to the server WITH_FEDERATED_STORAGE_ENGINE:BOOL=ON // Link INNOBASE statically to the server WITH_INNOBASE_STORAGE_ENGINE:BOOL=ON // WITH_INNODB_MEMCACHED:BOOL=OFF // By default use bundled libevent on this platform WITH_LIBEVENT:STRING=bundled // Compile with tcp wrappers support WITH_LIBWRAP:BOOL=1 // Explicitly set NUMA memory allocation policy WITH_NUMA:BOOL=ON // Link PARTITION statically to the server WITH_PARTITION_STORAGE_ENGINE:BOOL=ON // Link PERFSCHEMA statically to the server WITH_PERFSCHEMA_STORAGE_ENGINE:BOOL=ON // Generate PIC objects WITH_PIC:BOOL=ON // bundled (use yassl), yes (prefer os library if present, otherwise use bundled), system (use os library), </path/to/custom/installation> WITH_SSL:STRING=bundled // Export libmysqlclient_16 and libmysqlclient_18 symbol versions WITH_SYMVER16:BOOL=OFF // Compile MySQL with unit tests WITH_UNIT_TESTS:BOOL=ON // Valgrind instrumentation WITH_VALGRIND:BOOL=OFF // WITH_ZLIB:STRING=bundled
编译
make -j 4 && make install Scanning dependencies of target abi_check Scanning dependencies of target INFO_SRC Scanning dependencies of target INFO_BIN [ 1%] Building C object zlib/CMakeFiles/zlib.dir/adler32.c.o [ 1%] Built target INFO_SRC [ 1%] Built target INFO_BIN [ 1%] [ 1%] Building CXX object extra/yassl/CMakeFiles/yassl.dir/src/buffer.cpp.o Building CXX object extra/yassl/taocrypt/CMakeFiles/taocrypt.dir/src/aes.cpp.o [ 1%] Built target abi_check [ 1%] Building C object zlib/CMakeFiles/zlib.dir/compress.c.o [ 1%] Building C object zlib/CMakeFiles/zlib.dir/crc32.c.o [ 1%] Building C object zlib/CMakeFiles/zlib.dir/deflate.c.o [ 1%] Building CXX object extra/yassl/CMakeFiles/yassl.dir/src/cert_wrapper.cpp.o [ 1%] Building C object zlib/CMakeFiles/zlib.dir/gzio.c.o [ 1%] Building C object zlib/CMakeFiles/zlib.dir/infback.c.o [ 2%] Building CXX object extra/yassl/CMakeFiles/yassl.dir/src/crypto_wrapper.cpp.o [ 3%] Building CXX object extra/yassl/taocrypt/CMakeFiles/taocrypt.dir/src/aestables.cpp.o [ 3%] Building CXX object extra/yassl/taocrypt/CMakeFiles/taocrypt.dir/src/algebra.cpp.o [ 3%] Building C object zlib/CMakeFiles/zlib.dir/inffast.c.o [ 3%] Building C object zlib/CMakeFiles/zlib.dir/inflate.c.o [ 3%] Building C object zlib/CMakeFiles/zlib.dir/inftrees.c.o [ 3%] Building C object zlib/CMakeFiles/zlib.dir/trees.c.o [ 3%] Building CXX object extra/yassl/taocrypt/CMakeFiles/taocrypt.dir/src/arc4.cpp.o [ 3%] Building CXX object extra/yassl/taocrypt/CMakeFiles/taocrypt.dir/src/asn.cpp.o [ 3%] Building C object zlib/CMakeFiles/zlib.dir/uncompr.c.o [ 4%] Building C object zlib/CMakeFiles/zlib.dir/zutil.c.o [ 4%] Building CXX object extra/yassl/taocrypt/CMakeFiles/taocrypt.dir/src/coding.cpp.o [ 4%] Building CXX object extra/yassl/CMakeFiles/yassl.dir/src/handshake.cpp.o Linking C static library libzlib.a [ 4%] Built target zlib [ 4%] Generating common.h [ 4%] Generating help.c [ 4%] Generating help.h [ 5%] Generating vi.h [ 5%] Generating emacs.h [ 5%] Generating fcns.c [ 5%] Generating fcns.h Scanning dependencies of target edit [ 5%] Building C object cmd-line-utils/libedit/CMakeFiles/edit.dir/chared.c.o [ 5%] Building CXX object extra/yassl/taocrypt/CMakeFiles/taocrypt.dir/src/des.cpp.o [ 5%] Building C object cmd-line-utils/libedit/CMakeFiles/edit.dir/chartype.c.o [ 5%] [ 5%] Building C object cmd-line-utils/libedit/CMakeFiles/edit.dir/el.c.o Building CXX object extra/yassl/taocrypt/CMakeFiles/taocrypt.dir/src/dh.cpp.o [ 5%] Building CXX object extra/yassl/CMakeFiles/yassl.dir/src/lock.cpp.o [ 5%] Building CXX object extra/yassl/CMakeFiles/yassl.dir/src/log.cpp.o [ 5%] Building CXX object extra/yassl/CMakeFiles/yassl.dir/src/socket_wrapper.cpp.o [ 5%] Building CXX object extra/yassl/taocrypt/CMakeFiles/taocrypt.dir/src/dsa.cpp.o [ 5%] Building C object cmd-line-utils/libedit/CMakeFiles/edit.dir/eln.c.o [ 5%] Building CXX object extra/yassl/CMakeFiles/yassl.dir/src/ssl.cpp.o [ 5%] Building CXX object extra/yassl/taocrypt/CMakeFiles/taocrypt.dir/src/file.cpp.o [ 5%] [ 5%] Building CXX object extra/yassl/taocrypt/CMakeFiles/taocrypt.dir/src/hash.cpp.o Building C object cmd-line-utils/libedit/CMakeFiles/edit.dir/history.c.o [ 5%] Building CXX object extra/yassl/taocrypt/CMakeFiles/taocrypt.dir/src/integer.cpp.o [ 6%] Building CXX object extra/yassl/taocrypt/CMakeFiles/taocrypt.dir/src/md2.cpp.o [ 6%] Building C object cmd-line-utils/libedit/CMakeFiles/edit.dir/historyn.c.o [ 6%] Building CXX object extra/yassl/taocrypt/CMakeFiles/taocrypt.dir/src/md4.cpp.o [ 6%] Building CXX object extra/yassl/taocrypt/CMakeFiles/taocrypt.dir/src/md5.cpp.o [ 6%] Building CXX object extra/yassl/CMakeFiles/yassl.dir/src/timer.cpp.o [ 6%] Building CXX object extra/yassl/CMakeFiles/yassl.dir/src/yassl_error.cpp.o [ 6%] Building CXX object extra/yassl/taocrypt/CMakeFiles/taocrypt.dir/src/misc.cpp.o [ 6%] Building CXX object extra/yassl/CMakeFiles/yassl.dir/src/yassl_imp.cpp.o [ 6%] Building CXX object extra/yassl/taocrypt/CMakeFiles/taocrypt.dir/src/random.cpp.o [ 6%] Building C object cmd-line-utils/libedit/CMakeFiles/edit.dir/map.c.o [ 6%] Building CXX object extra/yassl/taocrypt/CMakeFiles/taocrypt.dir/src/ripemd.cpp.o [ 6%] Building C object cmd-line-utils/libedit/CMakeFiles/edit.dir/prompt.c.o [ 7%] Building C object cmd-line-utils/libedit/CMakeFiles/edit.dir/readline.c.o [ 7%] Building CXX object extra/yassl/taocrypt/CMakeFiles/taocrypt.dir/src/rsa.cpp.o [ 7%] Building CXX object extra/yassl/taocrypt/CMakeFiles/taocrypt.dir/src/sha.cpp.o [ 7%] Building C object cmd-line-utils/libedit/CMakeFiles/edit.dir/search.c.o [ 7%] Building C object cmd-line-utils/libedit/CMakeFiles/edit.dir/tokenizer.c.o [ 7%] Building C object cmd-line-utils/libedit/CMakeFiles/edit.dir/tokenizern.c.o [ 7%] Building CXX object extra/yassl/CMakeFiles/yassl.dir/src/yassl_int.cpp.o [ 7%] Building CXX object extra/yassl/taocrypt/CMakeFiles/taocrypt.dir/src/rabbit.cpp.o [ 7%] Building C object cmd-line-utils/libedit/CMakeFiles/edit.dir/vi.c.o [ 7%] Building CXX object extra/yassl/taocrypt/CMakeFiles/taocrypt.dir/src/hc128.cpp.o [ 7%] Building C object cmd-line-utils/libedit/CMakeFiles/edit.dir/common.c.o [ 7%] Building C object strings/CMakeFiles/strings.dir/bchange.c.o [ 7%] Building C object strings/CMakeFiles/strings.dir/bmove_upp.c.o [ 7%] Building C object strings/CMakeFiles/strings.dir/ctype-big5.c.o [ 7%] Building C object cmd-line-utils/libedit/CMakeFiles/edit.dir/emacs.c.o [ 7%] Building C object cmd-line-utils/libedit/CMakeFiles/edit.dir/hist.c.o [ 7%] Building C object strings/CMakeFiles/strings.dir/ctype-bin.c.o Linking CXX static library libtaocrypt.a [ 7%] Building C object cmd-line-utils/libedit/CMakeFiles/edit.dir/keymacro.c.o [ 7%] Built target taocrypt [ 7%] Building C object libservices/CMakeFiles/mysqlservices.dir/my_snprintf_service.c.o [ 7%] Building C object libservices/CMakeFiles/mysqlservices.dir/thd_alloc_service.c.o [ 8%] Building C object strings/CMakeFiles/strings.dir/ctype-cp932.c.o [ 8%] Building C object libservices/CMakeFiles/mysqlservices.dir/thd_wait_service.c.o [ 8%] Building C object libservices/CMakeFiles/mysqlservices.dir/my_plugin_log_service.c.o [ 8%] Building C object libservices/CMakeFiles/mysqlservices.dir/my_thread_scheduler_service.c.o [ 8%] Building C object libservices/CMakeFiles/mysqlservices.dir/mysql_string_service.c.o [ 8%] Building C object cmd-line-utils/libedit/CMakeFiles/edit.dir/parse.c.o Linking C static library libmysqlservices.a [ 8%] Built target mysqlservices [ 8%] Building CXX object sql/CMakeFiles/gen_lex_hash.dir/gen_lex_hash.cc.o [ 8%] Building C object cmd-line-utils/libedit/CMakeFiles/edit.dir/read.c.o [ 8%] Building C object extra/yassl/CMakeFiles/yassl.dir/__/__/client/get_password.c.o [ 8%] Building C object strings/CMakeFiles/strings.dir/ctype-czech.c.o Linking CXX static library libyassl.a Linking CXX executable gen_lex_hash [ 8%] Built target yassl [ 8%] [ 8%] Building C object regex/CMakeFiles/regex.dir/regcomp.c.o Bui