MySQL installation process

Source: Internet
Author: User


Essential Tools


1:linux system

2:mysql installation Package http://www.mysql.com

3:cmake (CMake compiled installation) Ncuress-devek (development tools default installation)


Avoid port conflicts check MySQL installation situation


Rpm-q mysql-server MySQL (query is installed)


Compiling and installing CMake


CD cmake-2.8.6

./configure

Gmake && gmake Install


Compile and install MySQL


Groupadd MySQL (build group)

Useradd-m-s/sbin/nologin mysql-g MySQL (build program user)


Tar zxfmysql-5.5.22.tar.gz-c/usr/src/(decompression MySQL compression pack)

cd/usr/src/mysql-5.5.22/


CMake

-dcmake_install_prefix=/usr/local/mysql (Specify installation to a directory)

-DSYSCONFDIR=/ETC (configuration file directory)

-ddefault_charset=utf8 (default character set encoding UTF8)

-ddefault_collation=utf8_general_ci (General rules)

-dwith_extra_charsets=all (additional support character all means all)


Make && makeinstall (install)


making adjustments to the database catalog chown-r Mysql:mysql/usr/local/mysql


setting up a configuration file CP Source Code package/support-files/my-medium.cnf/etc/my.cnf


Initializing the database


/usr/local/mysql/scripts/mysql_install_db

--user=mysql

--basedir=/usr/local/mysql (Specify base directory)

--datadir=/usr/local/mysql/data (Specify Data directory)


Setting Environment Variables

Vim/etc/profile

Add path= $PATH:/usr/local/mysql/bin

. /etc/profile (refresh, effective immediately)


Adding system Services


CP Source Code Package/SUPPORT-FILES/MYSQL.SERVER/ETC/RC.D/INIT.D/MYSQLD (Copy service script)

chmod +x/etc/rc.d/init.d/mysqld (set permissions)

Chkconfig--add mysqld (added as Mysqld system service)



Start the service Service mysqld Start




2017.7.11

Jianyu

This article is from the "Jianyu" blog, make sure to keep this source http://jianyu97.blog.51cto.com/12222102/1946476

MySQL installation process

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.