MySQL installation in Linux under the detailed

Source: Internet
Author: User

#查询源码包 Yum List|grep ncurses-devel

#创建gcc: yum-y Install make gcc-c++ cmake bison-devel ncurses-devel

Download MySQL installation package: wget https://dev.mysql.com//Downloads/MySQL-5.6/mysql-5.6.35.tar.gz

to decompress; Tar zxvf mysql-5.6.35.tar.gz

to enter; CD mysql-5.6.35

Recursively creating directories: Mkdir-p/usr/local/mysql/data

Compile and install:

CMake \

-dcmake_install_prefix=/usr/local/mysql \

-dmysql_datadir=/usr/local/mysql/data \

-DSYSCONFDIR=/ETC \

-dwith_myisam_storage_engine=1 \

-dwith_innobase_storage_engine=1 \

-dwith_memory_storage_engine=1 \

-dwith_readline=1 \

-dmysql_unix_addr=/usr/local/mysql/mysql.sock \

-dmysql_tcp_port=3306 \

-denabled_local_infile=1 \

-dwith_partition_storage_engine=1 \

-dextra_charsets=all \

-ddefault_charset=utf8 \

-ddefault_collation=utf8_general_ci

Dcmake_install_prefix=dir_name Setting up the MySQL installation directory
-dmysql_unix_addr=file_name Set the listener socket path, which must be an absolute pathname. Default is/tmp/mysql.sock
-ddefault_charset=charset_name Sets the character set of the server.
By default, MySQL uses the latin1 (CP1252 Western European) character set. The Cmake/character_sets.cmake file contains a list of allowed character set names.
-ddefault_collation=collation_name Sets the collation of the server.
-dwith_innobase_storage_engine=1
-dwith_archive_storage_engine=1
-dwith_blackhole_storage_engine=1
-dwith_perfschema_storage_engine=1
Storage Engine Options:

Myisam,merge,memory, and the CSV engine is compiled to the server by default and does not need to be explicitly installed.

Statically compiles a storage engine to the server, using-dwith_engine_storage_engine= 1

The available storage engine values are: ARCHIVE, Blackhole, EXAMPLE, Federated, Innobase (InnoDB), PARTITION (partitioning support), and Perfschema ( Performance Schema)
-dmysql_datadir=dir_name Set the MySQL database file directory
-dmysql_tcp_port=port_num Set the MySQL server listening port, default to 3306
-denable_downloads=bool Whether you want to download the optional files. For example, if you enable this option (set to 1), CMake will download the test suite that Google uses to run unit tests.

MySQL installation in Linux under the detailed

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.