1.1 安装数据库
yum -y install mariadb-client mariadb-server
1.2 启动数据库
systemctl start mariadb
1.3 设置数据库开机自启
systemctl enable mariadb
1.4 查看数据库状态
systemctl status mariadb
1.5 查看mysql权限
select user,password,host from user;
1.6 赋予用户,密码权限
grant all privileges on *.* to 'root'@'%' identified by '123456' with grant option;
1.7 修改字符编码
vi etc/my.cnf
1.8 停止数据库
systemctl stop mariadb
1.9 重启数据库
systemctl start mariadb
1.10 查看数据库字符编码
show variables like '%char%';