Lamp-mysql Installation

Source: Internet
Author: User
Tags php software

System environment: Linux CentOS 6.7 x86_64

Database software: MySQL 5.7.132 binary Compiler-free package

Web Services software: Apache 2.4.20

PHP Software: PHP 5.6.25


Install MySQL:

Go to package storage directory: CD/USR/LOCAL/SRC

Download Mysql:wget http://downloads.mysql.com/archives/get/file/mysql-5.7.13-linux-glibc2.5-x86_64.tar.gz from official website or mirror station

Decompression: Tar zxf mysql-5.7.13-linux-glibc2.5-x86_64.tar.gz

Mobile Directory: MV Mysql-5.7.13-linux-glibc2.5-x86_64/usr/local/mysql

Create user mysql:useradd-s/sbin/nologin MySQL

Create a directory for data storage datadir:mkdir-p/data/mysql

Change the genus Group of DataDir: Chown-r mysql/data/mysql

Go to installation directory: Cd/usr/local/mysql

Initialize database:./bin/mysqld--initialize--user=mysql--datadir=/data/mysql

Copy configuration file: CP support-files/my-default.cnf/etc/my.cnf

To modify a configuration file:

# These is commonly set, remove the # and set as required.

Basedir =/usr/local/mysql

DataDir =/data/mysql

Port = 3306

# server_id = ...

Socket =/tmp/mysql.sock

Copy startup script: CP Support-files/mysql.server/etc/init.d/mysqld

To modify the startup script:

Basedir=/usr/local/mysql

Datadir=/data/mysql


Add the system service entry, set to boot:

[Email protected] mysql]# chkconfig--add mysqld

[Email protected] mysql]# chkconfig mysqld on

[[Email protected] mysql]# service mysqld start


This article is from the "Parody Games" blog, so be sure to keep this source http://kevinjin117.blog.51cto.com/11655131/1843797

Lamp-mysql 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.