LAMP+LNMP (ii) MYSQL/MARIADB Overview and installation Practice

Source: Internet
Author: User
Tags error handling

I. Overview of MYSQL/MARIADB
MySQL was developed by my SQL company in 1995, the relational database management software, MySQL development several times after the version replacement, the latest is 5.7ga/8.0dmr,my SQL company itself has also experienced two acquisitions, first was acquired by Sun, and then acquired by Oracle, So now MySQL belongs to Oracle's commercial software.

In 2009, one of MySQL's original authors and some MySQL developers developed the MARIADB. of which Mariadb5.5 corresponded the mysql5.5,10.0 corresponded to 5.6.

MARIADB itself is Google, Mozilla, and Wikimedia Foundation. Use.

Second, MySQL installation

(i) RPM package installation

The whole process is actually a bit like downloading a green software package under Windows.

1. First, we need to download the MySQL binary package

CD USR/LOCAL/SRC
wget http://mirrors.sohu.com/mysql/MySQL-5.6/mysql-5.6.36-linux-glibc2.5-x86_64.tar.gz

2. Unzip the package

Tar zxvf mysql-5.6.36-linux-glibc2.5-x86_64.tar.gz

3, put the Unpacked program folder into the/usr/local/path, and change the name mysql/

Mv-v mysql-5.6.36-linux-glibc2.5-x86_64//usr/local/mysql

Note that this step after the CD to this directory to see if there is a relevant sub-folder, sometimes the MySQL folder may already exist, you will be the MV, just extracted from the east to all the files, and so on the experiment will be wrong.

4. Create a MySQL user and/data/directory in the system

Useradd MySQL
mkdir/data/

5. Set MySQL user and path

./scripts/mysql_install_db--user=mysql--datadir=/data/mysql/

There will be errors when performing this step,

Here's how to add error handling
A, use the Yum command to see if there are any RPM packages that provide the above program

Yum List | grep Perl |grep-i dumper


B, Bing, Google search previous solutions.

C, here we need to install the first package "perl-data-dumper.x86_64"

Yum Install-y perl-data-dumper.x86_64

And then we'll execute the SET command.

Or a mistake.

./scripts/mysql_install_db--user=mysql--datadir=/data/mysql/


Here is the missing Libaio library file

A, look again.

Yum List |grep Libaio

b, put the packaging on the

Yum Install-y libaio*

And then we'll execute the SET command.

./scripts/mysql_install_db--user=mysql--datadir=/data/mysql
Start jumping a lot of characters. To install for half a minute.
Remember the echo $ when installing httpd in the front?
echo $?

Execute the echo $ command immediately, and the return value is 0 OK.

(ii) Source code installation
(iii) binary-free compilation (recommended in practice)

LAMP+LNMP (ii) MYSQL/MARIADB Overview and installation Practice

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.