CentOS Next Server installs the version number MySQL

Source: Internet
Author: User


First of all, this is the path here. and statements are in the Internet to see a lot of errors after their own practice after the change, I hope to be useful to everyone.

Here in the installation of the time to follow my order. Otherwise, the corresponding instruction may not be found due to a path error.

one, install cmake
# Install the required dependency package (this instruction is entered all the time)
Yum-y Install GCC Libxml2-dev Curl screen \
Libpng12-dev autoconf libpcre3-dev make bzip2 \
Libevent-dev Patch LIBJ Peg62-dev libcurl4-openssl-dev \
Libfreetype6-dev g++ libtool libncurses5-dev psmisc lrzsz
 
# download File
wget http://www.cmake.org/files/v2.8/cmake-2.8.5.tar.gz

# compile and install
Tar zxvf cmake-2.8.5.tar.gz
CD cmake-2.8.5
./bootstrap
Make && make install
cmake–version
 
II, installation configuration MySQL
# Download source file
wget http://dev.mysql.com/get/Downloads/MySQL-5.5/mysql-5.5.17.tar.gz/from/ftp://ftp.ntu.edu.tw/pub/ mysql/
 
# Create users and Groups
Groupadd MySQL
useradd-g mysql -s/usr/sbin/nologin  MySQL
 
# Create installation folder
mkdir /usr/local/mysql
 
# Create Database folder
mkdir /usr/local/mysql/data
&NBSP
# Unzip
TAR-ZXVF mysql-5.5.17.tar.gz
CD \mysql-5.5.17
 
# Compile and install MySQL
# CMake compile: 
CMake.

Attention:

This may be an error, assuming an error. Then run the statement after the compilation:

Rm-f CMakeCache.txt

Yum Install Ncurses-devel

# install MySQL
Make && make install

# Copy configuration file
CP SUPPORT-FILES/MY-MEDIUM.CNF/ETC/MY.CNF

# Set permissions
chmod +x/usr/local/mysql
Chown-r Mysql.mysql/usr/local/mysql
Chown-r Mysql:mysql/usr/local/mysql/data

# Configure boot from boot
CP Support-files/mysql.server/etc/init.d/mysqld
chmod +x/etc/init.d/mysqld
Chkconfig--Add mysqld
Chkconfig mysqld on

# Change MY.CNF Configuration
Vim/etc/my.cnf
# [MYSQLD] Join:
Datadir=/usr/local/mysql/data
Default-storage-engine=myisam

# The following options are available:
Log-error =/usr/local/mysql/data/error.log
Pid-file =/usr/local/mysql/data/mysql.pid
user = MySQL
Tmpdir =/tmp

# Initialize Database
/usr/local/mysql/scripts/mysql_install_db--user=mysql--basedir=/usr/local/mysql--datadir=/usr/local/mysql/data &

# start MySQL
/etc/init.d/mysqld Start (service mysqld start)

# test if MySQL starts
# 1) See if there is a process MySQL
Ps-ef | grep MySQL
# 2) See if Port is performing
NETSTAT-TNL | grep 3306
# 3) Read MySQL version number information
/usr/local/mysql/bin/mysql--version

# to date, MySQL installation

Copyright notice: This article blog original articles, blogs, without consent, may not be reproduced.

CentOS Next Server installs the version number MySQL

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.