Rapid deployment of MySQL5.6.34 database practices

Source: Internet
Author: User
Tags php language

Chapter I. MySQL INTRODUCTION


1.1 What is MySQL

In a nutshell, a database is a repository of computer data that is organized and stored in accordance with a certain data structure, which refers to the organization of the database or the connection between the data. We can manage the data in the interim through a variety of methods provided by the database.


2.2 Why Choose MySQL Database

Undoubtedly, the vast majority of small and medium-sized Internet sites using the Linux operating system are using MySQL as the back-end database storage, from the large bat portal to the e-commerce platform, the category portal login without exception is the MySQL database. So, what are the advantages and characteristics of MySQL database, so that everyone will not hesitate to choose it?

MySQL Benefits:

1.MySQL performance, service stability, very few abnormal downtime

2.MySQL Open Source code with no copyright restrictions, autonomy and low cost of use

3.MySQL has a long history, community and users are very active, encountered problems, can seek help

4.MySQL software is small in size, easy to install and easy to maintain, low installation and maintenance costs

5.MySQL brand Word-of-mouth effect, is the enterprise without consideration for direct use, LAMP, lemp Popular architecture

6.MySQL supports a variety of operating systems, provides a variety of API interfaces, support a variety of development languages, especially for the popular PHP language has a good support



Chapter II MySQL Installation Deployment


2.1 Download the dependency package required by MySQL

Yum Install Ncurses-devel libaio-devel-y

Rpm-qa Ncurses-devel Libaio-devel


2.2 Download MySQL compilation tool CMake

Yum Install Cmake-y

Rpm-qa CMake


2.2.1 CMake Introduction

CMake is a cross-platform, open-source building system (System for building)

CMake refers to a series of tools for building, testing, and packaging software

CMake control the software compilation process with a simple platform-and compiler-independent configuration file


2.3 Starting MySQL Installation

#创建MySQL服务管理用户

cd/home/oldboy/tools/

Useradd-s/sbin/nologin-m MySQL

ID MySQL # Check


# download MySQL installation package

wget https://downloads.mysql.com/archives/get/file/mysql-5.6.34.tar.gz
Ls-l mysql-5.6.34.tar.gz


# unzip MySQL

Tar XF mysql-5.6.34.tar.gz

CD mysql-5.6.34


# mysql Compilation parameters

# start compiling MySQL

CMake. -dcmake_install_prefix=/application/mysql-5.6.34 \
-dmysql_datadir=/application/mysql-5.6.34/data \
-dmysql_unix_addr=/application/mysql-5.6.34/tmp/mysql.sock \
-ddefault_charset=utf8 \
-DDEFAULT_COLLATION=UTF8_GENERAL_CI \
-dwith_extra_charsets=all \
-dwith_innobase_storage_engine=1 \
-dwith_federated_storage_engine=1 \
-dwith_blackhole_storage_engine=1 \
-dwithout_example_storage_engine=1 \
-dwith_zlib=bundled \
-dwith_ssl=bundled \
-denabled_local_infile=1 \
-dwith_embedded_server=1 \
-denable_downloads=1 \
-dwith_debug=0

Make && make install

Note: The compilation process may be a bit slow, wait patiently!


# Create a soft connection for MySQL

Ln-s/application/mysql-5.6.34/application/mysql

ll/application/mysql/

CP SUPPORT-FILES/MY*.CNF/ETC/MY.CNF

cd/application/mysql/scripts/


# Add Environment variables
Echo ' path=/application/mysql/bin/: $PATH ' >>/etc/profile
Source/etc/profile


# Initialize Database

/application/mysql/scripts/mysql_install_db--basedir=/application/mysql/--datadir=/application/mysql/data-- User=mysql


# Generate Startup script

CP Support-files/mysql.server/etc/init.d/mysqld


# Authorization for Scripts

chmod 700/etc/init.d/mysqld


# MySQL Start-up and boot from boot

Chkconfig mysqld on

Chkconfig--list mysqld

/etc/init.d/mysqld start


# View startup status

Netstat-lntup|grep MySQL


# error Log
Tail-100/application/mysql/data/db01.err


# Create a password for MySQL

[Email protected] ~]# mysqladmin-uroot password
Enter Password: oldboy123


# Change password for MySQL

[Email protected] ~]# mysqladmin-uroot-poldboy123 password oldboy456


# Log in to MySQL admin

[Email protected] ~]# mysql-uroot-poldboy123

This article is from the "lming" blog, make sure to keep this source http://lmin32.blog.51cto.com/12206256/1907186

Rapid deployment of MySQL5.6.34 database practices

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.