Installation of Lnmp--mysql

Source: Internet
Author: User

1. Pre-preparation

Create group: Groupadd MySQL
Create User: Useradd-r-g MySQL MySQL

Create MySQL folder in data store folder

Mkdir-p/usr/www/mysql/data

Yum install cmake-y #一般没有cmake and need to be installed.

2. Download the source code

: Http://dev.mysql.com/downloads/mysql/5.6.html#downloads

tar-zxvf mysql-5.6.33-linux-glibc2.5-x86_64.tar.gz

3. Installation

There are two installation methods, one is the binary installation, the other is the source code installation

GLIBC is a binary package, directly decompressed, change the configuration file, initialize, start on it.

Source installation package, only need to compile CMake

cd/usr/local/mysql/<br>mkdir ./data/mysqlchownmysql:  MySQL././scripts/mysql_install_db--user= mysql--datadir=/usr/www/mysql/data/mysql

Error:

FATAL Error:please Install the following Perl modules before executing./SCRIPTS/MYSQL_INSTALL_DB:
Data::D umper

Solve:
Yum Install-y Perl-module-install.noarch


CPsupport-files/mysql. server/etc/init.d/mysqldchmod 755/etc/init.d/MYSQLDCP support-files/my-default. cnf/etc/my.cnf
#Modifying startup Scriptsvi/etc/init.d/mysqld#To Modify an item:basedir=/usr/local/MySQL/DataDir=/usr/local/MySQL/data/MySQL #Start the serviceService mysqld Start#Test Connection./MySQL/bin/MySQL-Uroot#Add environment variables and edit/etc/profile so you can use MySQL command anywhere.Export path=$PATH:/usr/local/MySQL//Bin<br>source/etc/profile  #start MySQLService mysqld Start#turn off MySQLService mysqld Stop#View Run StatusService MYSQLD Status

MySQL Installation cmake parameters:

-dcmake_install_prefix= Install root directory -dcmake_install_prefix=  UNIX Socket directory -ddefault_charset= default Character Set -ddefault_collation= the default encoding -dwith_extra_charsets= additional encodings, use all to compile. -dwith_myisam_storage_engine=1   compiles the MYISAM storage engine, the default storage engine, does not add can also -dwith_innobase_storage_engine=1 Support InnoDB Storage engine, this is also the default installation of -dwith_readline=1 use READLINE function -denabled_local_infile=1 can use the load data infile command to import files from local -dmysql_datadir= database Data Directory

Resources:

http://blog.csdn.net/hsd2012/article/details/51232612

Http://www.cnblogs.com/bookwed/p/5896619.html

Installation of Lnmp--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.