mariadb installation (centos7.6)

1, yum-line installation

   yum -y install mariadb mariadb-server

service mariadb start
systemctl enable mariadb 
initial configuration
Execution: mysql_secure_installation 
complete the initial configuration of the prompts, modify the configuration file After the configuration

File /etc/my.cnf

we /etc/my.cnf

Added at [mysqld] tab

init_connect='SET collation_connection = utf8_unicode_ci' 
init_connect='SET NAMES utf8' 
character-set-server=utf8 
collation-server=utf8_unicode_ci 
skip-character-set-client-handshake

File /etc/my.cnf.d/client.cnf

we /etc/my.cnf.d/client.cnf

Add [client] in

default-character-set=utf8

File /etc/my.cnf.d/mysql-clients.cnf

we /etc/my.cnf.d/mysql-clients.cnf

Add [MySQL] in

default-character-set=utf8

 All configuration is complete, restart mariadb

systemctl restart mariadb


2, off-line installation

In can be networked environment (usually in the VMware set up a test environment)

执行   yum install  --downloadonly --downloaddir=/root/mariadb/  mariadb mariadb-server

Once downloaded, the folder compression packing, transport to offline environment, extract

Executed in the extracted directory: yum install ./*

After installation is complete configuration process with online installation

Guess you like

Origin www.cnblogs.com/beiguapipi/p/11233863.html