mysql-5.5.46 Source Code Compilation installation

Source: Internet
Author: User

1. Installation Preparation

cat/etc/redhat-release

uname-r

yum install ncurses-devel cmake automake autoconf make gcc gcc-c+ + bison-y

mkdir  /application/data-p

groupadd MySQL

useradd -g  mysql  -s  /sbin/nologin-m mysql

2. Source code installation

CD Tools

Tar XF mysql-5.5.46.tar.gz

CMake.-dcmake_install_prefix=/application/mysql-5.5.46 \

-dmysql_datadir=/application/data \

-dmysql_unix_addr=/application/mysql-5.5.46/tmp/mysql.sock\

-ddefault_charset=utf8 \

-DDEFAULT_COLLATION=UTF8_GENERAL_CI \

-DEXTRA_CHARSETS=GBK,GB2312,UTF8,ASCII \

-denabled_local_infile=on \

-dwith_innobase_storage_engine=1 \

-dwith_myisam_storage_engine=1 \

-dwith_federated_storage_engine=1 \

-dwith_blackhole_storage_engine=1 \

-dwithout_example_storage_engine=1 \

-dwithout_partition_storage_engine=1 \

-dwith_fast_mutexes=1 \

-dwith_zlib=bundled \

-denabled_local_infile=1 \

-dwith_readline=1 \

-dwith_embedded_server=1 \

-dwith_debug=0

Make && makeinstall

3.Mysql initialization and configuration

CP support-files/my-small.cnf/etc/my.cnf

cd /application

chown-r mysql.mysql data

chmod-r 1777/tmp/

cd/application/mysql/scripts/

./mysql_install_db--basedir=/application/mysql &NBSP, --datadir=/application/data--user=mysql

4. Join the boot start

/etc/init.d/mysqld

chmod +x/etc/init.d/mysqld 

chkconfig--add mysqld

chkconfig mysqld on

chkconfig mysqld--list

/etc/init.d/mysqld start

netstat-tunlp|grep mysqld

lsof-i:3306

5. Setting the MySQL environment variable

echo "path=/application/mysql/bin/: $PATH" >>/etc/profile

Source/etc/profile

which MySQL


This article is from the "Lanzhou Linux operation and Maintenance" blog, please be sure to keep this source http://linuxzkq.blog.51cto.com/9379412/1700082

mysql-5.5.46 Source Code Compilation installation

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.