Get the App
SLTechnology News&Howtos  ›  Database  › 

Mysql Learning Notes (4-General binary format installation MariaDB)

Shulou Source: shulou.com Published: 2022-06-01 09:39:18 09月28日 Update

Install and use MariaDB:

Installation method:

(1) rpm package

(a) provided by the issuer of OS

(B) official provision of procedures

(2) Source code packet

(3) packages in general binary format

Install MariaDB in universal binary format:

(1) prepare the data directory

Take the / mydata/data directory as an example

(2) install and configure mariadb

# useradd-r mysql

# tar xf mariadb-VERSION.tar.xz-C / usr/local

# cd / usr/local

# ln-sv mariadb-VERSION mysql

# cd / usr/local/mysql

# chown-R root:mysql. / *

# scripts/mysql_install_db-- user=mysql-datadir=/mydata/data

# cp support-files/mysql.server / etc/init.d/mysqld

# chkconfig-add mysqld

(3) provide configuration file

A configuration file in ini format through which all programs can obtain configuration information

[program_name]

OS Vendor provides the profile lookup order for the services installed by the mariadb rpm package:

/ etc/mysql/my.cnf-> / etc/my.cnf-- >-- default-extra-file=/PATH/TO/CONF_FILE-- > ~ / .my.cnf

The lookup order of configuration files for service programs installed in universal binary format:

/ etc/my.cnf-> / etc/mysql/my.cnf-- >-- default-extra-file=/PATH/TO/CONF_FILE-- > ~ / .my.cnf

The method to get its reading order:

Mysqld-verbose-help

# cp support-files/my-large.cnf / etc/my.cnf

Add three options:

Datadir = / mydata/data

Innodb_file_per_table = ON

Skip_name_resolve = ON

(4) start the service

# service mysqld start

Tags: Configuration file format program binary order service directory three information publisher official data method source code accessible preparation release notes Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno OPPO Reno Xiaomi MySQL Huawei NVidia