fixed 细节调整
This commit is contained in:
parent
f753c29c75
commit
aa361e2601
|
|
@ -0,0 +1,2 @@
|
||||||
|
[mysqld]
|
||||||
|
innodb_buffer_pool_size = 12G
|
||||||
|
|
@ -0,0 +1,3 @@
|
||||||
|
use mysql;
|
||||||
|
ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY 'gitlinK#%01';
|
||||||
|
FLUSH PRIVILEGES;
|
||||||
|
|
@ -1,17 +1,24 @@
|
||||||
version: '3'
|
version: '3'
|
||||||
services:
|
services:
|
||||||
db:
|
db:
|
||||||
image: mysql:5.7
|
image: mysql:8.4.4
|
||||||
container_name: mysql-public
|
container_name: mysql-public
|
||||||
restart: always
|
restart: always
|
||||||
command: mysqld --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci --innodb_flush_log_at_trx_commit=2 --max_connections=3000
|
command: |
|
||||||
|
mysqld --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci --innodb_flush_log_at_trx_commit=2 --max_connections=3000 --mysql_native_password=ON
|
||||||
volumes:
|
volumes:
|
||||||
|
- ./00-mysql-user-pwd.sql:/docker-entrypoint-initdb.d/1.sql
|
||||||
- /data/gitlink/packages/00-db/mysql-init:/docker-entrypoint-initdb.d
|
- /data/gitlink/packages/00-db/mysql-init:/docker-entrypoint-initdb.d
|
||||||
- /data/mysql/conf:/etc/mysql/conf.d
|
- /data/mysql/conf:/etc/mysql/conf.d
|
||||||
- /data/mysql/logs:/logs
|
- /data/mysql/logs:/logs
|
||||||
- /data/mysql/data:/var/lib/mysql
|
- /data/mysql/data:/var/lib/mysql
|
||||||
environment:
|
environment:
|
||||||
MYSQL_ROOT_PASSWORD: ${MYSQL_PASSWORD}
|
MYSQL_ROOT_PASSWORD: ${MYSQL_PASSWORD}
|
||||||
|
healthcheck:
|
||||||
|
test: [ "CMD", "mysqladmin", "ping", "-h", "localhost" ]
|
||||||
|
interval: 30s
|
||||||
|
timeout: 2s
|
||||||
|
retries: 1
|
||||||
ports:
|
ports:
|
||||||
- 3306:3306
|
- 3306:3306
|
||||||
networks:
|
networks:
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
docker exec -it mysql8 bash mysql -uroot -pgitlink_mysql_password use mysql; ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY 'gitlink_mysql_password'; FLUSH PRIVILEGES;
|
docker exec -it mysql-public mysql -uroot -pgitlinK#%01 use mysql; ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY 'gitlinK#%01'; FLUSH PRIVILEGES;
|
||||||
Loading…
Reference in New Issue