openstack安装(7)

2021-05-06 10:34:46 浏览数 (1)

三、安装配置数据库服务(MySQL)

[root@controller ~]# yum install -y mariadb mariadb-server MySQL-python

[root@controller ~]# cp /usr/share/mariadb/my-medium.cnf /etc/my.cnf #或者是/usr/share/mysql/my-medium.cnf

[root@controller ~]# vim /etc/my.cnf

[mysqld]

bind-address = 192.168.1.101

default-storage-engine = innodb

innodb_file_per_table

collation-server = utf8_general_ci

init-connect = 'SET NAMES utf8'

character-set-server = utf8

max_connections=1000

[root@controller ~]# systemctl enable mariadb.service && systemctl start mariadb.service #启动数据库服务,并将其配置为开机自启

[root@controller ~]# mysql_secure_installation #密码 123456,一路 y 回车

0 人点赞