First, Installation Environment
1. System Version
Centos6.7 bit
2. Mysql version
mysql-5.6.28
3. need to upload the source package (recommended that all source packages are uploaded to/usr/local/src, so that will not mess)
4. http://cdn.mysql.com//archives/mysql-5.6/mysql-5.6.28.tar.gz
Mysql-5.6.28.tar.gz
Https://cmake.org/files/v3.6/cmake-3.6.1.tar.gz
Cmake-3.6.1.tar.gz
First, Installation Steps
1 , installing CMake software
1 ), enter the upload package directory to extract CMake
Tar zxvf cmake-3.6.1.tar.gz
2 ), enter the extracted files, and configure, compile, install.
CD cmake-3.6.1
./configure–prefix=/usr/local/cmake// Specify the file installation directory
Make
Make install
3 ), create a linked file
Ln–s/usr/local/cmake/bin/cmake/usr/bin/cmake
2 , installation mysql5.6
1 ), enter the upload package directory to extract the mysql5.6, and create the directory
Mkdir–p/usr/local/mysql
mkdir–p/data/mysql/
Tar zxvf mysql-5.6.28.tar.gz
2), enter the decompression file, and configure, compile, install.
CD mysql-5.6.28 Cmake-dcmake_install_prefix=/usr/local/mysql-dmysql_unix_addr=/tmp/mysql.sock-ddefault_chars Et=utf8-ddefault_collation=utf8_general_ci-dwith_extra_charsets:string=utf8,gbk-dwith_myisam_storage_engine=1- Dwith_innobase_storage_engine=1-dwith_memory_storage_engine=1-dwith_readline=1-denabled_local_infile=1-dmysql_ Datadir=/data/mysql-dmysql_user=mysql make && make install
Parameter description:
650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M01/85/24/wKioL1ea5ibyqgLKAABS-4u3WOo791.png "title=" 11.png "alt=" Wkiol1ea5ibyqglkaabs-4u3woo791.png "/>
3 changing and starting the database
1) Modify the MySQL group
Chown–r Mysql:mysql/data/mysql/chown-r mysql:mysql/usr/local/mysql/
2 ), initialize the database
/usr/local/mysql/scripts/mysql_install_db--user=mysql \--basedir=/usr/local/mysql/--datadir=/data/mysql
3 ), copy the configuration file, and start MySQL
CP SUPPORT-FILES/MY-DEFAULT.CNF/ETC/MY.CNF Cp/etc/init.d/mysqld/root/mysqld_5.1_bak CP support-files/ Mysql.server/etc/init.d/mysqld chmod +x/etc/init.d/mysql/etc/init.d/mysqld Start
4 Logging into the database
/usr/local/mysql/bin/mysql
5 Summary of Errors encountered:
1) Compile the error encountered by MySQL:
--could not find Curses (missing:curses_library curses_include_path) CMake Errorat cmake/ReadLineNanake: -(MESSAGE): Curses library notfound. Please install appropriate Package, remove CMakeCache.txt andrerun CMake. On Debian/ubuntu, Packagename is Libncurses5-dev, on Redhat andderivates it is ncurses-devel. Call Stack (most recent call first): cmake/ReadLineNanake:107(find_curses) cmake/ReadLineNanake:181(mysql_use_bundled_editline) CMakeLists.txt:480(Mysql_check_editline)--Configuring incomplete, Errors occurred! See also"/mydata/mysql-5.7.6-m16/cmakefiles/cmakeoutput.log". See also"/mydata/mysql-5.7.6-m16/cmakefiles/cmakeerror.log".
Workaround: yum-y Install Ncurses-devel
2) Errors encountered while logging in to MySQL:
/usr/local/mysql/bin/mysql
Welcome to the MySQL Monitor. Commands End With; or \g.your MySQL connection ID is 8Server version:5.6.24 Source distributioncopyright (c) #, Oracle and/or its a Ffiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or itsaffiliates. Other names trademarks of their respectiveowners. Segmentation fault
MySQL version is 5.6.24
Server is CentOS6.0
Workaround:
In the source package, edit the file cmd-line-utils/libedit/terminal.c
Put the char in the Terminal_set method buf[tc_bufsize]; This line of comments, and then the area = buf, instead of area = NULL;
The following changes are made:
protected int Terminal_set (Editline *el, const char *term) {int i;/*char buf[tc_bufsize];*/# #注释掉char *area; Const STRU CT Termcapstr *t; sigset_t Oset, Nset; int Lins, cols; --phpfensi.com (void) sigemptyset (&nset); (void) Sigaddset (&nset, sigwinch); (void) Sigprocmask (Sig_block, &nset, &oset); area = NULL;
Then recompile MySQL to
This article is from the "Drifting Away" blog, make sure to keep this source http://825536458.blog.51cto.com/4417836/1831666
MySQL compilation installation