mariadb 安装配置
docker-compose.yml
mariadb:
image: mariadb
restart: unless-stopped
ports:
- 3306:3306
volumes:
- ./mariadb/data:/var/lib/mysql
environment:
- MARIADB_ROOT_PASSWORD=passwd
基本操作
赋权
CREATE database wordpress;
CREATE USER 'wordpress'@'%' IDENTIFIED BY 'wordpress';
grant all privileges on wordpress.* to wordpress@'%' identified by 'wordpress';
grant all privileges on wordpress.* to wordpress@'127.0.0.1' identified by 'wordpress';
flush privileges;