CentOS7下安装配置MariaDB

Posted flow

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了CentOS7下安装配置MariaDB相关的知识,希望对你有一定的参考价值。

参考:

  • http://www.2cto.com/os/201504/394141.html
  • http://outofmemory.cn/code-snippet/2533/mysql-create-database-specify-utf-8-coding
  • https://mariadb.com/kb/en/mariadb/setting-character-sets-and-collations/
yum install mariadb mariadb-server
systemctl status mariadb.service
systemctl enable mariadb.service
systemctl start mariadb.service
mysql_secure_installation
mysql -uroot -p
MariaDB> show variables like collation_%;
MariaDB> show variables like character_set_%;
MariaDB> set collation_database=utf8_general_ci;
MariaDB> set collation_server=utf8_general_ci;
MariaDB> show variables like collation_%;
MariaDB> show variables like character_set_%;
MariaDB> CREATE DATABASE IF NOT EXISTS yourdbname DEFAULT CHARSET utf8 COLLATE utf8_general_ci;

 

以上是关于CentOS7下安装配置MariaDB的主要内容,如果未能解决你的问题,请参考以下文章

CentOS7下MariaDB数据库安装及配置

mariadb安装后存在centos7哪个目录下

Linux中Centos7下安装Mysql(更名为Mariadb)

centOS下mariadb配置

MariaDB的安全配置

CentOS7下MySQL的安装与配置