forked from ebhomengo/niki
31 lines
773 B
YAML
31 lines
773 B
YAML
version: '3.9'
|
|
|
|
services:
|
|
mysql:
|
|
platform: linux/amd64
|
|
image: mysql:8.0
|
|
ports:
|
|
- 3305:3305
|
|
volumes:
|
|
- ~/apps/mysql:/var/lib/mysql
|
|
restart: always
|
|
hostname: mysql
|
|
container_name: niki_mysql
|
|
environment:
|
|
- MYSQL_ROOT_PASSWORD=niki_user
|
|
- MYSQL_PASSWORD=NIKI_user@123
|
|
- MYSQL_USER=user
|
|
- MYSQL_DATABASE=niki
|
|
|
|
|
|
#set mysql in ubuntu
|
|
#//https://www.tecmint.com/fix-mysql-error-1819-hy000/
|
|
#
|
|
# sudo mysql_secure_installation
|
|
# sudo systemctl start mysql
|
|
# mysql> CREATE USER 'user'@'localhost' IDENTIFIED BY 'g#Y!298mKwz85';
|
|
# mysql> create database orginfo;
|
|
# mysql> grant all privileges on orginfo.* to user@localhost;
|
|
# mysql> set password for user@localhost = password("g#Y!298mKwz85");
|
|
|