mariadb|docker compose-不在docker compose-up上创建db用户/数据库



当前我正在尝试设置一个数据库,以便与我的项目rn,我之前设置了一个。。。但我忘了我是如何运行它/设置的

离开我目前的docker为我的另一个项目撰写文件我有这个即用

version: '2.1'
services:
project-mariadb:
image: mariadb:10.3.16
stop_grace_period: 45s
volumes:
- projectdb-1:/var/lib/mysql/
- projectsocket-1:/var/run/mysqld/
- ./src/database/conf/mysql/:/etc/mysql/conf.d/:ro
environment:
- MYSQL_ROOT_PASSWORD=stackrootpassword
- MYSQL_DATABASE=projectdb
- MYSQL_USER=projectadmin
- MYSQL_PASSWORD=stackpassword
restart: always
ports:
- "13362:3306"

networks:
default:
external:
name: my_external_network
volumes: 
projectdb-1:
projectsocket-1:

但是在运行docker compose build/docker compose up-d时当我docker exec进入实例并进入mysql时我的用户或数据库没有创建

我试过什么docker-compose down -vdocker volume rm <volume>docker-compose up -d

这些结果最终在docker 中显示了此日志

project-mariadb_1  | 2020-12-02  0:33:14 0 [Note] mysqld (mysqld 10.3.16-MariaDB-1:10.3.16+maria~bionic) starting as process 1 ...
project-mariadb_1  | 2020-12-02  0:33:14 0 [Note] InnoDB: Using Linux native AIO
project-mariadb_1  | 2020-12-02  0:33:14 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
project-mariadb_1  | 2020-12-02  0:33:14 0 [Note] InnoDB: Uses event mutexes
project-mariadb_1  | 2020-12-02  0:33:14 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
project-mariadb_1  | 2020-12-02  0:33:14 0 [Note] InnoDB: Number of pools: 1
project-mariadb_1  | 2020-12-02  0:33:14 0 [Note] InnoDB: Using SSE2 crc32 instructions
project-mariadb_1  | 2020-12-02  0:33:14 0 [Note] InnoDB: Initializing buffer pool, total size = 24M, instances = 1, chunk size = 24M
project-mariadb_1  | 2020-12-02  0:33:14 0 [Note] InnoDB: Completed initialization of buffer pool
project-mariadb_1  | 2020-12-02  0:33:14 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
project-mariadb_1  | 2020-12-02  0:33:14 0 [Note] InnoDB: 128 out of 128 rollback segments are active.
project-mariadb_1  | 2020-12-02  0:33:14 0 [Note] InnoDB: Creating shared tablespace for temporary tables
project-mariadb_1  | 2020-12-02  0:33:14 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
project-mariadb_1  | 2020-12-02  0:33:14 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
project-mariadb_1  | 2020-12-02  0:33:15 0 [Note] InnoDB: 10.3.16 started; log sequence number 1630860; transaction id 21
project-mariadb_1  | 2020-12-02  0:33:15 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
project-mariadb_1  | 2020-12-02  0:33:15 0 [Note] Server socket created on IP: '::'.
project-mariadb_1  | 2020-12-02  0:33:15 0 [Note] InnoDB: Buffer pool(s) load completed at 201202  0:33:15
project-mariadb_1  | 2020-12-02  0:33:15 0 [Warning] 'proxies_priv' entry '@% root@volume' ignored in --skip-name-resolve mode.
project-mariadb_1  | 2020-12-02  0:33:15 6 [Note] Event Scheduler: scheduler thread started with id 6
project-mariadb_1  | 2020-12-02  0:33:15 0 [Note] mysqld: ready for connections.
project-mariadb_1  | Version: '10.3.16-MariaDB-1:10.3.16+maria~bionic'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  mariadb.org binary distribution

我试过马里亚德:最新/10.4/4.4.8/10.3.16所有人都给了我同样的问题。

希望我在这个中提供了足够的细节

谨致问候,Phil

我使用的密码可能把mysql/mariadb的设置搞砸了还有一个奇怪的管理员用户名!

相关内容

  • 没有找到相关文章

最新更新