CREATE USER 'root'@'%' IDENTIFIED BY 'Test#123';
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' WITH GRANT OPTION;
Tag: mysql
run mysql with docker-compose
mysql.yml
version: '3'
services:
mysql:
image: mysql
restart: always
container_name: mysql
environment:
MYSQL_ROOT_PASSWORD: "password"
volumes:
- /opt/docker/mysql:/var/lib/mysql
ports:
- 3306:3306
start : docker-compose -f mysql.yml up -d
stop : docker-compose -f mysql.yml down