1、安装相关的包
yum install mariadb mariadb-server python2-PyMySQL -y
2、创建并编辑文件
直接复制下面整条命令即可,这个是echo直接写入
#注意IP换成自己的
Vim /etc/my.cnf.d/openstack.cnf
[mysqld]
bind-address = 192.168.244.133
default-storage-engine = innodb
innodb_file_per_table
max_connections = 4096
collation-server = utf8_general_ci
character-set-server = utf8
3、启动并设置成开机启动
systemctl enable mariadb.service
systemctl start mariadb.service
4、设置密码
mysql_secure_installation
Enter current password for root (enter for none): 第一步回车
Set root password? [Y/n] 选择Y
输入密码,这里记住自己输入的密码
Remove anonymous users? 选择是,移除匿名用户