yum install mariadb mariadb-server python2-PyMySQL -y
#ubuntu 20 이상
apt install mariadb-server python3-pymysql -y
vi docker-compose.yaml
version: '3.1'
services:
db:
# container_name: mariadb # cri-o,podman을 사용할 경우는 주석
image: mariadb:10.5 # 적절한 버전 선택
restart: always
environment:
MYSQL_ROOT_PASSWORD: mysql
ports:
- 3306:3306
volumes:
- ./volumes/mysql/var/lib/mysql:/var/lib/mysql
- ./volumes/etc/my.cnf.d:/etc/my.cnf.d
./voulmes/etc/my.cnf.d/openstack.cnf
[mysqld]
default-storage-engine = innodb
innodb_file_per_table = on
max_connections = 4096
collation-server = utf8_general_ci
character-set-server = utf8