//系统
CentOS Linux release 7.7.1908 (AltArch)
//firewall设置
# firewall-cmd --zone=public --permanent --add-service=mysql# systemctl restart firewalld# mysql -V //mysql版本信息
mysql Ver 15.1 Distrib 5.5.64-MariaDB, for Linux (armv7l) using readline 5.1
//补充1,授权命令
MariaDB [(none)]> create user 'your user name'@'localhost' identified by 'your passwd';
MariaDB [(none)]> grant all privileges on database_name.* to 'your user name'@'localhost' identified by 'your passwd';
MariaDB [(none)]> flush privileges;
//补充2
//配置mariadb字符集
//编辑 /etc/my.cnf.d/server.cnf 文件,在[mysqld]标签下添加如下内容:
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
lower_case_table_names=1
//编辑 /etc/my.cnf.d/client.cnf 文件,在[client]标签下加入如下内容:
default-character-set=utf8
//重启mariadb与验证
# systemctl restart mariadb.service
MariaDB [(none)]> show variables like "%character%";
MariaDB [(none)]> show variables like "%collation%";