MySQL use Experience (i) CentOS or Ubuntu installation mysql5.6

Source: Internet
Author: User
Tags change settings zip dedicated server centos

Official website

http://www.mysql.com/

Download

Downloads (GA)--> MySQL Community Edition (GPL)

Installation dependencies

Centos

Yum install gcc gcc-c++ ncurses-devel zip make CMake

Ubuntu

Apt-get install gcc g++ cmake make Libncurses5-dev bison zip

Decompression

TAR-ZXVF mysql-5.6.14.tar.gz

Attention:

Source directory and installation directory do not use the same directory!

Clean up the environment

Rm-rf/etc/my.cnf

Userdel MySQL

Groupdel MySQL

installing MySQL

cmake-dcmake_install_prefix=/application/search/mysql/mysql-5.6.14 \

-dmysql_datadir=/data0/search/mysql/data \

-ddefault_charset=utf8 \

-DDEFAULT_COLLATION=UTF8_GENERAL_CI \

-dwith_innobase_storage_engine=1 \

-dwith_archive_storage_engine=1 \

-dwith_blackhole_storage_engine=1 \

-dwith_federated_storage_engine=1 \

-dwith_partition_storage_engine=1 \

-denabled_local_infile=1

Note: If you want to cmake, you need to delete the RM-RF in the directory CMakeCache.txt

Make-j16 && make Install-j16

=====================================================

Modify configuration file/application/search/mysql/mysql-5.6.14/tmp/my.cnf

Configuration files are the most critical difference between 5.5 and 5.6.

=====================================================

# for advice on I-Change settings

# http://dev.mysql.com/doc/refman/5.6/en/server-configuration-defaults.html

# * * * Don't EDIT this FILE. It ' s a template which would be copied to the

# * * * * * * default location during install, and would be replaced if you

# * * * * Upgrade to a newer version of MySQL.

# User Client Bin directory to log in using directly

[Client]

Port = 3306

Socket =/application/search/mysql/mysql-5.6.14/tmp/mysql.sock

[MySQL]

Default-character-set=utf8

[Mysqld]

# Remove Leading # and set to the amount's RAM for the most important data

# Cache in MySQL. Start at 70% all RAM for dedicated server, else 10%.

Innodb_buffer_pool_size = 1024M

Innodb_data_file_path = Ibdata1:64m:autoextend

Innodb_log_file_size = 1G

Innodb_log_files_in_group = 3

Innodb_log_buffer_size = 8M

Innodb_flush_log_at_trx_commit = 0

Innodb_use_sys_malloc = 0

Related Article

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.