MySQL source package mode installation (mysql5.5)

Source: Internet
Author: User

-------start blogging, hope to work and daily learning some of the knowledge and experience to share with you!

After Mysql5.5, installing MySQL using the source package will need to be compiled CMake way. The following sections describe the steps to install MySQL by CMake:

One: Prepare before installation.

1: Check the system for presence MySQL users and groups.

# grep "MySQL"/etc/passwd

2 : If present, delete MySQL users and groups.

# userdel-r MySQL

#groupdel-R MySQL

3: Create MySQL users and groups.

# groupadd-g MySQL

#useradd-u 27-g mysql-d/dev/null/-s/sbin/nologin MySQL

4: Create a data store directory.

#mkdir-P/mydata

Two: Download mysql5.5 with the CMake source package, and unzip.

# wget Http://downloads.mysql.com/archives/mysql-5.5/mysql-5.5.25a.tar.gz-P/usr/ local/src/

#wget http://wwwNaNake.org/files/v2.8/cmake-2.8.4.tar.gz-P/usr/local/src/

#cd/usr/local/src/

#tar-zxvf mysql-5.5.25a.tar.gz

#tar-zxvf cmake-2.8.4.tar.gz

Three: Compile and install CMake tools.

# cd cmake-2.8.4

#./configure--prefix=/usr/local/cmake

#make&& make install

Four: Using CMake Tool Installation MySQL 5.5

# Exportpath= $PATH: $HOME/bin:/usr/local/cmake/bin: $PATH

# cmake . -dcmake_install_prefix=/usr/local/mysql5.5.25-dmysql_datadir=/mydata- Dmysql_unix_addr=/tmp/mysql.sock-dwith_innobase_storage_engine=1-dmysql_tcp_port=3306-dextra_charsets=all- Ddefault_charset=utf8-ddefault_collation=utf8_general_ci-dwith_debug=0

#make –j 3 && make install

V: Initialize MySQL .

# cd/usr/local/src/mysql-5.5.25a

#CP support-files/my-large.cnf/etc/my.cnf

#CP support-files/mysql.server/etc/init.d/mysqld

#chmod +x/etc/init.d/mysqld

#chkconfig--add mysqld

#sh./scripts/mysql_install_db--user=mysql--basedir=/usr/local/mysql5.5.25/--datadir=/ mydata/

#chown-r mysql.mysql/usr/local/mysql5.5.25

#Ulimit-s Unlimited

Six: Start up MySQL .

#service mysqld Restart


This article is from the Linux OPS blog, so be sure to keep this source http://icenycmh.blog.51cto.com/4077647/1671550

MySQL Source package installation (mysql5.5)

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.