CENTOS7 binary Installation mariadb latest version 10.2.8

Source: Internet
Author: User
Tags mkdir

1. See if the system is installed

Rpm-qa mariadb*

2. Create the system user MySQL and specify its home directory as/app/mysqldb

①getent passwd mysql②useradd-d/app/mysqldb-r-m-s/sbin/nologin mysql #-r create system user-M Create home directory-D Specify home directory

3. Unzip the installation package to/usr/local

①tar xvf mariadb-10.2.8-linux-x86_64.tar.gz-c/usr/local/##-c hi Specifies the destination directory for unpacking ②cd/usr/local/③ln-s mariadb-10.2.8-linux-x 86_64/mysql # #创建软连接

4. Create a configuration file/etc/mysql/my.cnf

①cd/usr/local/mysql/
②mkdir/etc/mysql/

③CP support-files/my-huge.cnf/etc/mysql/my.cnf

④vim/etc/mysql/my.cnf

[Mysqld]

DataDir =/app/mysqldb # #指定mysql数据库存放目录

Innodb_file_per_table = On

Skip_name_resolve = On

5. Install MySQL Database

scripts/mysql_install_db--user=mysql--datadir=/app/mysqldb

6. Add Mysqld Service

①CP support-files/mysql.server/etc/init.d/mysqld②chkconfig--list mysqld③chkconfig--add mysqld④service mysqld start Kai Failed to move

7. Turn on MySQL service

①mkdir/var/log/mariadb/②chown mysql/var/log/mariadb/③service mysqld Start open successfully

Note: If this step turns on the service failure and you are prompted not to find the database, repeat step 5 to install the database again

8. Add mysqld command to path Path

①vim/etc/profile.d/mysql.shpath=/usr/local/mysql/bin: $PATH ②. /etc/profile.d/mysql.sh

9. Security initialization

Mysql_secure_installation

10. Login with root user test

Mysql-uroot-p ' Root_password ' Enter the password, login success!!


CENTOS7 binary Installation mariadb latest version 10.2.8

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.