Debian 6.02 (Squeeze) to compile the method of installing MySQL 5.5 _mysql

Source: Internet
Author: User
Environment: Debian 6.02 (squeeze) x64
Software: MySQL 5.5.14
Steps:
1, upgrade the system
#apt-get Update

#apt-get Upgrade

#apt-get Install chkconfig libpcre3-dev build-essential libssl-dev Libncurses5-dev Bison
2, the preparation of software
cmake-2.8.5, MySQL 5.5.14
#wget http://www.cmake.org/files/v2.8/cmake-2.8.5.tar.gz

#wget ftp://mirror.anl.gov/pub/mysql/Downloads/MySQL-5.5/mysql-5.5.14.tar.gz
3, installation
1), Installation CMake
#tar ZXVF cmake-2.8.5.tar.gz

#cd cmake-2.8.5/

#./configure

#make && make Install
2), add MySQL user
Groupadd MySQL

Useradd--shell/sbin/nologin-g MySQL MySQL
3), install MySQL
#tar ZXVF mysql-5.5.14.tar.gz

#cd mysql-5.5.14

#cmake \

-dcmake_install_prefix=/usr/local/mysql \

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

-ddefault_charset=utf8 \

-DDEFAULT_COLLATION=UTF8_GENERAL_CI \

-dextra_charsets=all \

-dwith_myisam_storage_engine=1 \

-dwith_innobase_storage_engine=1 \

-dwith_readline=1 \

-denabled_local_infile=1 \

-dmysql_tcp_port=3306

#make && make Install
4), change the installation folder permissions
#chown-R mysql:mysql/usr/local/mysql/

#chown-R Mysql:mysql/usr/local/data/mysql
5), initialization of the words
#sh scripts/mysql_install_db--basedir=/usr/local/mysql/--datadir=/usr/local/data/mysql--user=mysql
6), copy MySQL configuration file, generate startup script
#cp support-files/my-medium.cnf/etc/my.cnf

#cp Support-files/mysql.server/etc/init.d/mysqld
7), set from start
#chmod 755/etc/init.d/mysqld

#chkconfig mysqld on
8), set the environment variable
#nano/etc/profile
Add the following content
Export Path=/usr/local/mysql/bin: $PATH

Alias mysql_start= "Mysqld_safe &"

Alias mysql_stop= "Mysqladmin–u root-p shutdown"
4. Start test
#service mysqld Start

#/usr/local/mysql/bin/mysql-uroot–p
5, Password and security configuration
#/usr/mysql/bin/mysql_secure_installation

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.