How to install the community version of MySQL 5.5.8 under CentOS

Source: Internet
Author: User
Tags bool mkdir mysql centos

Please refer to this document when you need to install Mysql5.5.8.

Installs the Mysql5.5.8 service, provides the company CSFDP test environment. The formal environment also uses this version of MySQL

1.1. Environmental

PC: IntelE5300 memory 4G hard disk 500G

Mysql5.5.8

cmake2.8.3

2.1. Install CMake

Shell>tar ZXVF cmake-2.8.3.tar.gz

SHELL>CD cmake-2.8.3

Shell>./configure

Shell>make

Shell>make Install

2.2. Install MySQL

Shell>tar ZXVF mysql-5.5.8.tar.gz

SHELL>CD mysql-5.5.8

Shell>cmake. \

-dcmake_install_prefix:path=/usr/local/mysql \

-dcommunity_build:bool=on \

-denabled_profiling:bool=on \

-denable_debug_sync:bool=off \

-dinstall_layout:string=standalone \

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

-dmysql_maintainer_mode:bool=off \

-dwith_embedded_server:bool=on \

-dwith_extra_charsets:string=all \

-dwith_ssl:string=bundled \

-dwith_unit_tests:bool=off \

-dwith_zlib:string=bundled \

-dwith_innobase_storage_engine=1 \

-dwith_comment=dancebear \

-ddefault_charset=utf8 \

-DDEFAULT_COLLATION=UTF8_GENERAL_CI \

-lh

Shell>make && make Install

Shell>groupadd MySQL

shell>useradd-g MySQL MySQL

Shell>mkdir/usr/local/mysql/conf

Shell>mkdir/usr/local/mysql/var

Shell>cd/usr/local/mysql

SHELL>CP support-files/my-huge.cnf conf/my.cnf

Shell>chown-r Root:mysql/usr/local/mysql

Shell>/usr/local/mysql/scripts/mysql_install_db--basedir=/usr/local/mysql--datadir=/usr/local/mysql/data-- Skip-name-resolve--user=mysql--defaults-file=/usr/local/mysql/conf/my.cnf--pid-file=/usr/local/mysql/var/ Mysql.pid--socket=/usr/local/mysql/var/mysql.sock

Shell>ln-s/usr/local/mysql/bin/mysql/usr/bin/mysql

Shell>ln-s/usr/local/mysql/bin/mysqladmin/usr/bin/

Shell>ln-s/usr/local/mysql/bin/mysqld_safe/usr/bin/

Shell>ln-s/usr/local/mysql/share/mysql/mysql.server/usr/bin/

Shell>ln-s/usr/local/mysql/bin/mysqldump/usr/bin/

3 MySQL automatic startup script

Shell>cp/usr/local/mysql/support-files/mysql.server/etc/init.d/mysqld

Shell>chmod 755/etc/init.d/mysqld

Shell>chkconfig–-add mysqld

Shell>chkconfig–-level 345 mysqld on

Modify the configuration file/etc/init.d/mysqld to add a path to install MySQL

Basedir=/usr/local/mysql

Datadir=/usr/local/mysql/data

You can use the following command to start and stop the MySQL service or view the current MySQL service status

Shell>/etc/init.d/mysqld start

Shell>/etc/init.d/mysqld stop

SHELL>/ETC/INIT.D/MYSQLD status

4 root Password

Shell>/usr/local/mysql/bin/mysqladmin–u root password ' password '

This column more highlights: http://www.bianceng.cnhttp://www.bianceng.cn/OS/Linux/

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.