当前位置: 首页 > 知识库问答 >
问题:

Docker-与管理员作曲

范修伟
2023-03-14

我花了几个小时调试我的系统,我不知道这里发生了什么。

我正在使用一个简单的docker组合。yml文件,用于在我的Ubuntu 20.04 LTS系统上启动mariadb和adminer实例

docker-compose.yml:

version: '3'
services:
  database:
    image: mariadb
    restart: always
    environment:
      MYSQL_DATABASE: feedback
      MYSQL_USER: db_user
      MYSQL_PASSWORD: password
      MYSQL_ROOT_PASSWORD: root

  adminer:
    image: adminer
    restart: always
    environment: 
      ADMINER_DEFAULT_SERVER: database
    ports:
      - "127.0.0.1:8080:8080"

一位同事测试了这个,它100%的时间都在他们的系统上工作。然而,在过去的几个小时里,在我的系统中,它只运行了两次。

这是docker compose输出:

Creating knowledge-base_database_1 ... done
Creating knowledge-base_adminer_1  ... done
Attaching to knowledge-base_adminer_1, knowledge-base_database_1
database_1  | 2021-05-31 12:17:04+00:00 [Note] [Entrypoint]: Entrypoint script for MariaDB Server 1:10.5.10+maria~focal started.
adminer_1   | [Mon May 31 12:17:04 2021] PHP 7.4.19 Development Server (http://[::]:8080) started
database_1  | 2021-05-31 12:17:04+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
database_1  | 2021-05-31 12:17:04+00:00 [Note] [Entrypoint]: Entrypoint script for MariaDB Server 1:10.5.10+maria~focal started.
database_1  | 2021-05-31 12:17:05+00:00 [Note] [Entrypoint]: Initializing database files
database_1  | 
database_1  | 
database_1  | PLEASE REMEMBER TO SET A PASSWORD FOR THE MariaDB root USER !
database_1  | To do so, start the server, then issue the following command:
database_1  | 
database_1  | '/usr/bin/mysql_secure_installation'
database_1  | 
database_1  | which will also give you the option of removing the test
database_1  | databases and anonymous user created by default.  This is
database_1  | strongly recommended for production servers.
database_1  | 
database_1  | See the MariaDB Knowledgebase at https://mariadb.com/kb or the
database_1  | MySQL manual for more instructions.
database_1  | 
database_1  | Please report any problems at https://mariadb.org/jira
database_1  | 
database_1  | The latest information about MariaDB is available at https://mariadb.org/.
database_1  | You can find additional information about the MySQL part at:
database_1  | https://dev.mysql.com
database_1  | Consider joining MariaDB's strong and vibrant community:
database_1  | https://mariadb.org/get-involved/
database_1  | 
database_1  | 2021-05-31 12:17:06+00:00 [Note] [Entrypoint]: Database files initialized
database_1  | 2021-05-31 12:17:06+00:00 [Note] [Entrypoint]: Starting temporary server
database_1  | 2021-05-31 12:17:06+00:00 [Note] [Entrypoint]: Waiting for server startup
database_1  | 2021-05-31 12:17:06 0 [Note] mysqld (mysqld 10.5.10-MariaDB-1:10.5.10+maria~focal) starting as process 99 ...
database_1  | 2021-05-31 12:17:06 0 [Note] InnoDB: Uses event mutexes
database_1  | 2021-05-31 12:17:06 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
database_1  | 2021-05-31 12:17:06 0 [Note] InnoDB: Number of pools: 1
database_1  | 2021-05-31 12:17:06 0 [Note] InnoDB: Using crc32 + pclmulqdq instructions
database_1  | 2021-05-31 12:17:06 0 [Note] mysqld: O_TMPFILE is not supported on /tmp (disabling future attempts)
database_1  | 2021-05-31 12:17:06 0 [Note] InnoDB: Using Linux native AIO
database_1  | 2021-05-31 12:17:06 0 [Note] InnoDB: Initializing buffer pool, total size = 134217728, chunk size = 134217728
database_1  | 2021-05-31 12:17:06 0 [Note] InnoDB: Completed initialization of buffer pool
database_1  | 2021-05-31 12:17:06 0 [Note] InnoDB: 128 rollback segments are active.
database_1  | 2021-05-31 12:17:06 0 [Note] InnoDB: Creating shared tablespace for temporary tables
database_1  | 2021-05-31 12:17:06 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
database_1  | 2021-05-31 12:17:06 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
database_1  | 2021-05-31 12:17:06 0 [Note] InnoDB: 10.5.10 started; log sequence number 45118; transaction id 20
database_1  | 2021-05-31 12:17:06 0 [Note] Plugin 'FEEDBACK' is disabled.
database_1  | 2021-05-31 12:17:06 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
database_1  | 2021-05-31 12:17:06 0 [Note] InnoDB: Buffer pool(s) load completed at 210531 12:17:06
database_1  | 2021-05-31 12:17:06 0 [Warning] 'user' entry 'root@5315aa145a33' ignored in --skip-name-resolve mode.
database_1  | 2021-05-31 12:17:06 0 [Warning] 'proxies_priv' entry '@% root@5315aa145a33' ignored in --skip-name-resolve mode.
database_1  | 2021-05-31 12:17:06 0 [Note] Reading of all Master_info entries succeeded
database_1  | 2021-05-31 12:17:06 0 [Note] Added new Master_info '' to hash table
database_1  | 2021-05-31 12:17:06 0 [Note] mysqld: ready for connections.
database_1  | Version: '10.5.10-MariaDB-1:10.5.10+maria~focal'  socket: '/run/mysqld/mysqld.sock'  port: 0  mariadb.org binary distribution
database_1  | 2021-05-31 12:17:07+00:00 [Note] [Entrypoint]: Temporary server started.
database_1  | Warning: Unable to load '/usr/share/zoneinfo/leap-seconds.list' as time zone. Skipping it.
database_1  | Warning: Unable to load '/usr/share/zoneinfo/leapseconds' as time zone. Skipping it.
database_1  | Warning: Unable to load '/usr/share/zoneinfo/tzdata.zi' as time zone. Skipping it.
database_1  | 2021-05-31 12:17:09 5 [Warning] 'proxies_priv' entry '@% root@5315aa145a33' ignored in --skip-name-resolve mode.
database_1  | 2021-05-31 12:17:09+00:00 [Note] [Entrypoint]: Creating database feedback
database_1  | 2021-05-31 12:17:09+00:00 [Note] [Entrypoint]: Creating user db_user
database_1  | 2021-05-31 12:17:09+00:00 [Note] [Entrypoint]: Giving user db_user access to schema feedback
database_1  | 
database_1  | 2021-05-31 12:17:09+00:00 [Note] [Entrypoint]: Stopping temporary server
database_1  | 2021-05-31 12:17:09 0 [Note] mysqld (initiated by: root[root] @ localhost []): Normal shutdown
database_1  | 2021-05-31 12:17:09 0 [Note] Event Scheduler: Purging the queue. 0 events
database_1  | 2021-05-31 12:17:09 0 [Note] InnoDB: FTS optimize thread exiting.
database_1  | 2021-05-31 12:17:09 0 [Note] InnoDB: Starting shutdown...
database_1  | 2021-05-31 12:17:09 0 [Note] InnoDB: Dumping buffer pool(s) to /var/lib/mysql/ib_buffer_pool
database_1  | 2021-05-31 12:17:09 0 [Note] InnoDB: Buffer pool(s) dump completed at 210531 12:17:09
database_1  | 2021-05-31 12:17:09 0 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1"
database_1  | 2021-05-31 12:17:09 0 [Note] InnoDB: Shutdown completed; log sequence number 45130; transaction id 21
database_1  | 2021-05-31 12:17:09 0 [Note] mysqld: Shutdown complete
database_1  | 
database_1  | 2021-05-31 12:17:10+00:00 [Note] [Entrypoint]: Temporary server stopped
database_1  | 
database_1  | 2021-05-31 12:17:10+00:00 [Note] [Entrypoint]: MariaDB init process done. Ready for start up.
database_1  | 
database_1  | 2021-05-31 12:17:10 0 [Note] mysqld (mysqld 10.5.10-MariaDB-1:10.5.10+maria~focal) starting as process 1 ...
database_1  | 2021-05-31 12:17:10 0 [Note] InnoDB: Uses event mutexes
database_1  | 2021-05-31 12:17:10 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
database_1  | 2021-05-31 12:17:10 0 [Note] InnoDB: Number of pools: 1
database_1  | 2021-05-31 12:17:10 0 [Note] InnoDB: Using crc32 + pclmulqdq instructions
database_1  | 2021-05-31 12:17:10 0 [Note] mysqld: O_TMPFILE is not supported on /tmp (disabling future attempts)
database_1  | 2021-05-31 12:17:10 0 [Note] InnoDB: Using Linux native AIO
database_1  | 2021-05-31 12:17:10 0 [Note] InnoDB: Initializing buffer pool, total size = 134217728, chunk size = 134217728
database_1  | 2021-05-31 12:17:10 0 [Note] InnoDB: Completed initialization of buffer pool
database_1  | 2021-05-31 12:17:10 0 [Note] InnoDB: 128 rollback segments are active.
database_1  | 2021-05-31 12:17:10 0 [Note] InnoDB: Creating shared tablespace for temporary tables
database_1  | 2021-05-31 12:17:10 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
database_1  | 2021-05-31 12:17:10 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
database_1  | 2021-05-31 12:17:10 0 [Note] InnoDB: 10.5.10 started; log sequence number 45130; transaction id 20
database_1  | 2021-05-31 12:17:10 0 [Note] Plugin 'FEEDBACK' is disabled.
database_1  | 2021-05-31 12:17:10 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
database_1  | 2021-05-31 12:17:10 0 [Note] InnoDB: Buffer pool(s) load completed at 210531 12:17:10
database_1  | 2021-05-31 12:17:10 0 [Note] Server socket created on IP: '::'.
database_1  | 2021-05-31 12:17:10 0 [Warning] 'proxies_priv' entry '@% root@5315aa145a33' ignored in --skip-name-resolve mode.
database_1  | 2021-05-31 12:17:10 0 [Note] Reading of all Master_info entries succeeded
database_1  | 2021-05-31 12:17:10 0 [Note] Added new Master_info '' to hash table
database_1  | 2021-05-31 12:17:10 0 [Note] mysqld: ready for connections.
database_1  | Version: '10.5.10-MariaDB-1:10.5.10+maria~focal'  socket: '/run/mysqld/mysqld.sock'  port: 3306  mariadb.org binary distribution

尝试使用root:root与管理员一起登录数据库会产生以下输出:

adminer_1   | [Mon May 31 12:17:54 2021] [::ffff:172.25.0.1]:38170 Accepted
adminer_1   | [Mon May 31 12:17:54 2021] [::ffff:172.25.0.1]:38170 [302]: POST /?server=database&username=root
adminer_1   | [Mon May 31 12:17:54 2021] [::ffff:172.25.0.1]:38170 Closing
adminer_1   | [Mon May 31 12:17:54 2021] [::ffff:172.25.0.1]:38174 Accepted
adminer_1   | [Mon May 31 12:18:24 2021] [::ffff:172.25.0.1]:38174 [403]: GET /?server=database&username=root
adminer_1   | [Mon May 31 12:18:24 2021] [::ffff:172.25.0.1]:38174 Closing
adminer_1   | [Mon May 31 12:18:24 2021] [::ffff:172.25.0.1]:38208 Accepted
adminer_1   | [Mon May 31 12:18:24 2021] [::ffff:172.25.0.1]:38208 [200]: GET /?file=favicon.ico&version=4.8.0
adminer_1   | [Mon May 31 12:18:24 2021] [::ffff:172.25.0.1]:38208 Closing

我尝试过禁用防火墙,重新安装docker和docker compose,用docker创建自定义网络,而不是使用docker compose的默认网络,等等。

我还在我的系统上启动了一个已知的工作项目,产生了同样的结果。我的系统似乎坏了,但我不知道去哪里找了。

有人知道我能做些什么吗?

共有1个答案

梁季
2023-03-14

尝试附加/index.php,这样就不用http://localhost转到http://localhost/index.php

 类似资料:
  • 仅企业版可用 获取管理员列表接口 创建管理员 删除管理员

  • 我需要将adminer与oracle连接,但在官方映像中不支持它。是否有用于oracle连接的管理员映像?或者如果有人可以指导我如何在当前映像中安装oci8扩展。

  • 一、简介 添加和管理管理员。 二、功能演示 1.添加管理员 2,管理管理员 对不需要或过期的管理员进行编辑和删除操作。如下图所示:

  • 一、简介 角色定位了拥有此角色的所有管理员权限,管理员可以为不同的角色成员分配不同的权限配置。 二、功能演示 1.成员管理 对该角色下所有管理员进行管理 2.角色编辑 编辑和添加操作相同,不做详述。 3.口令卡 V9系统集成了口令卡功能,使用户信息更见保密。下面我们做详细介绍。如下图: 点击“申请口令卡”后会提示申请成功.如下图: 注:申请口令卡成功后,请一定妥善保管生成的图片;如丢失,您将不能登

  • 我有三个docker容器(postgresql、adminer和go/migrate),我向主机公开了adminer和postgres端口。我可以在浏览器中访问adminer,Postco也可以连接到DB。当我尝试从adminer内连接到db时,它会抛出以下错误: 迁移容器也会引发此错误: 因此,很明显,容器之间如何相互通信存在问题。我需要创建一个docker网络吗?

  • 您可将员工导入您的企业,便于后续对他们的用车行为进行管理。管理方式包括对员工的新增、删除、修改;以及对员工信息的编辑修改(角色、用车制度的分配)等。系统同时支持手工操作与批量操作两种方式,便于您更好地管理员工。 您需要登录滴滴企业版用车管理后台,点击左侧边栏“员工”选项,即可进入员工管理页面。下面将为您介绍员工管理的具体方式。