Compiling and installing mysql5.6

Source: Internet
Author: User

1.mysql-5.6.26 the source version of the installation method is: http://dev.mysql.com/get/Downloads/MySQL-5.6/mysql-5.6.26.tar.gz/from/http:// Mysql.mirror.rafal.ca/2.tar XF mysql-5.6.26.tar.gz-c/usr/src/cd/usr/src/mysql-5.6.26/   --mysql5.5 version requires CMake (c language compiler) to compile the installation

  

Yum Groupinstall "Development tools"-yyum install gcc gcc-c++ ncurses-devel perl    ---------Avoid subsequent troubleshooting and install all dependent packages ( It will be mentioned later when you do not install GCC to perform make && make install error) yum install Cmake-ycmake. -dcmake_install_prefix=/usr/local/mysql56-ddefault_charset=utf8-ddefault_collation=utf8_general_ci-dwith_extra _charsets=gbk,gb2312-denabled_local_infile=1-dwith_innobase_storage_engine=1

  

echo $?-->1 error     yum install-y gcc-c++ (preferably just start wrapping all dependencies) Rm-f CMakeCache.txt re-execute Cmake-->echo $?-->0

  

3. Manually write MY.CNF configuration file mkdir/usr/local/mysql/etc vim/usr/local/mysql/etc/my.cnf[mysqld]port=3306   # # # # # The default port 3306 can not be specified datadir=/datapid-file=/var/run/mysqld/mysql.pidsocket=/data/mysql.socketlog-error=/var/log/ Mysqld/mysql-err.log[client]socket=/data/mysql.socket4. Initializing MySQL and starting MySQL initialization:/usr/local/mysql/scripts/mysql_ install_db--defaults-file=/usr/local/mysql/etc/my.cnf--basedir=/usr/local/mysql--user=mysql   ------------- First create a MySQL user start:/usr/local/mysql/bin/mysql  --defaults-file=/usr/local/mysql/etc/my.cnf &   ----> Check whether to start successfully  lsof-i:3306 if the view log is not started, Tail-200/var/log/mysqld/mysql-err.log

  

It is a good disk space to report errors, affecting data writing. Ll/data a few  three files are relatively large. Remove this three files after cleaning up disk space  rm-f/data/ib*  ------> restart.

5.   cp/usr/local/mysql/bin/mysql     /usr/bin/mysql56      --if you often get the above command longer, you can copy it to/usr/bin and rename it to Mysql56, In the future, using the MYSQL56 command to launch it is much easier to copy boot files to/ETC/INIT.D, Cp/usr/local/mysql56/support-files/mysql.server     /etc/init.d/ Mysql56  Modifying the mysql56 configuration file vim/etc/init.d/my.cnfconf=/etc/my.cnf    modify it to    conf=/usr/local/mysql/etc/my.cnf   (The configuration file can be created at the beginning of/etc, directly copied over without modification)

Compiling and installing mysql5.6

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.