MySQL installation (binary compiler-free installation)

Source: Internet
Author: User

(1) Download MySQL to/usr/local/src/directory

Cd/usr/local/src/wget http://syslab.comsenz.com/downloads/linux/mysql-5.1.40-linux-i686-icc-glibc23.tar.gz

(2) Unzip and move the extracted data to/usr/local/mysql (this step is to move and rename, not to move the data into this directory, itself this directory does not exist)

[Email protected] src]# tar zxvf/usr/local/src/mysql-5.1.40-linux-i686-icc-glibc23.tar.gz

[Email protected] src]# MV Mysql-5.1.40-linux-i686-icc-glibc23/usr/local/mysql

(3) Build MySQL user

[[email protected] src]# useradd-s/sbin/nologin-m MySQL

(4) Initializing the database

[Email protected] src]# cd/usr/local/mysql [[email protected] mysql]# mkdir-p/data/mysql; Chown-r Mysql:mysql/data/mysql [[email protected] mysql]#./scripts/mysql_install_db--user=mysql--datadir=/data/m Ysql

(5) Copy the configuration file and start the script and modify its properties

[email protected] mysql]# CP support-files/my-large.cnf/etc/my.cnf

[email protected] mysql]# CP support-files/mysql.server/etc/init.d/mysqld [[email protected] mysql]# chmod 755/et C/init.d/mysqld

(6) Modifying the startup script

[Email protected] mysql]# Vim/etc/init.d/mysqld

There are "Datadir=/data/mysql" and "Basedir=/usr/local/mysql" where modifications are required (DataDir is the directory defined when the database was previously initialized)

(7) Add the startup script to the system service item, and set the boot start, start MySQL

[[email protected] mysql]# chkconfig--add mysqld[[email protected] mysql]# chkconfig mysqld on[[email protected] mysql]# Service mysqld Start

(8) if it does not start, please check the error log under/data/mysql/, this log is usually the hostname. Err. The command to check if MySQL is started is:

[[Email protected] mysql]# PS aux |grep mysqld


This article is from the "7169431" blog, please be sure to keep this source http://7179431.blog.51cto.com/7169431/1878151

MySQL installation (binary compiler-free installation)

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.