centos7 Mariadb安装
Posted 毛台
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了centos7 Mariadb安装相关的知识,希望对你有一定的参考价值。
yum install mariadb-server mariadb -y
修改配置:
[mysqld]
default-storage-engine = innodb
innodb_file_per_table
character-set-server = utf8
collation-server = utf8_general_ci
init-connect = ‘SET NAMES utf8‘
?
systemctl start mariadb
systemctl enable mariadb
创建数据库
CREATE DATABASE IF NOT EXISTS cattle COLLATE = ‘utf8_general_ci‘ CHARACTER SET = ‘utf8‘;
GRANT ALL ON cattle.* TO ‘cattle‘@‘%‘ IDENTIFIED BY ‘cattle‘;
GRANT ALL ON cattle.* TO ‘cattle‘@‘localhost‘ IDENTIFIED BY ‘cattle‘;
?
--db-host IP or hostname of MySQL server
--db-port port of MySQL server (default: 3306)
--db-user username for MySQL login (default: cattle)
--db-pass password for MySQL login (default: cattle)
--db-name MySQL database name to use (default: cattle)
以上是关于centos7 Mariadb安装的主要内容,如果未能解决你的问题,请参考以下文章