易陆发现互联网技术论坛

 找回密码
 开始注册
查看: 275|回复: 0
收起左侧

Error response from daemon: mount /opt/jumpserver/config/mariadb/mariadb.cnf:/va

[复制链接]
发表于 2023-8-15 10:13:11 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?开始注册

x
Error response from daemon: mount /opt/jumpserver/config/mariadb/mariadb.cnf:/var/lib/docker/overlay2/a0ecacd1f734d4729dda971531bd0f26f35260724ae2a2cf1328e2c06822ad28/merged/etc/mysql/mariadb.cnf, flags: 0x5000: not a directory
0 N1 o4 t1 r, Y1 u- J4 w: D) K; h9 M. ]+ l* T$ d1 {9 e
提示报错:
$ V0 r9 A2 S2 D* R无法docker cp 容器里的文件到操作系统中:8 y" {: F& D  a- [$ @4 K
docker cp jms_mysql:/tmp/jumpserver.sql /tmp/
  @# U6 k5 ^- i' V0 `Error response from daemon: mount /opt/jumpserver/config/mariadb/mariadb.cnf:/var/lib/docker/overlay2/a0ecacd1f734d4729dda971531bd0f26f35260724ae2a2cf1328e2c06822ad28/merged/etc/mysql/mariadb.cnf, flags: 0x5000: not a directory
3 D; S. u! _* k8 L8 j- x  Q) T: \% T
5 B3 q6 {0 I( f' \& E8 F
解决办法就是5 i9 m; _, c  K/ ^; d
cd  /opt/jumpserver/config/mariadb/
  ~" G5 d3 f7 r cd  /opt/jumpserver/config/mariadb/& T& @3 ~* {3 w- h; T
[root@localhost mariadb]# ls' ?& C1 q' d7 L$ {1 M
mariadb.cnf  5 D) K1 Y: i! S; h3 W  l5 \* m
[root@localhost mariadb]# ls
" o7 }, f, K, _2 Omariadb.cnf  ! ]  l9 R* l8 w/ E$ E

; Z0 w7 s; [8 I9 P! U! K [root@localhost mariadb]#rm -rf mariadb.cnf! @( x4 f  V# `* t1 W% E

. Y$ ?' N% ]% c创建一个mariadb.cnf文件
$ E2 d! Q5 O, W* ]0 X2 T" V+ M' q+ b9 O4 }- @+ c: l
vim mariadb.cnf
3 G9 E5 W! ?7 S) X% D
/ F* ^" K, m9 p2 [& C/ u, Q# The MariaDB configuration file
* c) ^4 Y7 y- F#
# p* S% V1 f' ?2 Y, l# \) B$ d, `# The MariaDB/MySQL tools read configuration files in the following order:' e' m# @# [2 S; f' k" _+ n: q
# 0. "/etc/mysql/my.cnf" symlinks to this file, reason why all the rest is read.
4 m5 y' k) K7 U: y9 O8 Q6 r4 T3 g- z# 1. "/etc/mysql/mariadb.cnf" (this file) to set global defaults,
5 `# ]+ H2 G% G$ M9 S6 {% }* |# 2. "/etc/mysql/conf.d/*.cnf" to set global options.$ Q3 M" j: }3 k8 E
# 3. "/etc/mysql/mariadb.conf.d/*.cnf" to set MariaDB-only options.
, o: Z8 b/ r$ D1 S  \0 [# 4. "~/.my.cnf" to set user-specific options.. O1 i+ G7 C4 E. L2 b
#
/ r% P& J" q7 j& e# If the same option is defined multiple times, the last one will apply.+ F" M0 C* p$ b1 J8 T
#
7 {" o9 K% |+ r3 V9 O# One can use all long options that the program supports.
( `9 B- k" g% t# O# Run program with --help to get a list of available options and with; j/ A7 H9 u; h6 b- _
# --print-defaults to see which it would actually understand and use.
% B& S' w0 Q" T/ s3 d) l7 t#1 _  B7 q6 b; I+ K  k
# If you are new to MariaDB, check out https://mariadb.com/kb/en/basic-mariadb-articles/) t( _1 P2 y3 P9 s0 i9 ^
! J( ]5 f9 O* R0 b9 @  B, M6 _
#& }* L  F; U; r" y* @% k2 B1 c
# This group is read both by the client and the server7 {  e2 u" _- b/ O! x
# use it for options that affect everything4 s) u0 H* \- _5 B+ A/ k
#
1 \7 L- Q" `0 l  q6 Y[client-server]+ ~3 U* \, ]) |9 i
# Port or socket location where to connect/ r/ M# K5 S. i) B$ Q5 G  T
# port = 3306
( D/ B% K% j& G3 j+ ?9 Fsocket = /run/mysqld/mysqld.sock
& N" E* o5 J( e7 _7 d3 r
: P8 _/ |* @2 O' d; `# Import all .cnf files from configuration directory
' ]) m+ M. H+ g( E; o& I[mariadbd]
3 D& z4 X$ u. {: h8 `+ w" q9 J& pskip-host-cache
( G$ f# f' @  j; R* Z" p. m/ Zskip-name-resolve1 s! ?) R( `) w- T$ a
  c; T8 N7 L' F. E6 j( ]7 n0 J6 ?- F6 z4 j
!includedir /etc/mysql/mariadb.conf.d/4 O- P% c! N7 f! O( R; A
!includedir /etc/mysql/conf.d/6 D+ N; u% S5 h' r( w. l
! _- z3 G2 L1 G9 d, @

, B6 Y* d8 L* N: n保存退出就可以解决问题。1 Q& j* }4 w8 \; m9 a+ R9 B) N
再次docker cp就可以正常复制了。
+ H( R3 ?$ C4 `( k. E; t. x
2 G6 _! o/ i) R" w% l% L[root@localhost mariadb]# docker cp jms_mysql:/tmp/jumpserver.sql /tmp/
8 f& Q) ]' S2 k0 A) u6 Q$ h; b6 gSuccessfully copied 2.96MB to /tmp/) F; w1 ^* Y' P" w( T5 u1 R% d

* K5 }+ t1 G, u- D. Z
6 Z' s. W7 ]# s' \  O完美解决。
. B: Q2 ~/ |& ~5 @% C1 @2 J0 e
- @0 `$ F. B. z5 R' G2 J1 R" r/ r) [9 F0 E9 h/ M
: ?" b; [7 b8 q7 V- I3 F2 T3 c" e% f/ p

/ \; M9 g# V1 E/ D
您需要登录后才可以回帖 登录 | 开始注册

本版积分规则

关闭

站长推荐上一条 /4 下一条

北京云银创陇科技有限公司以云计算运维,代码开发

QQ|返回首页|Archiver|小黑屋|易陆发现技术论坛 ( 蜀ICP备2026014127号-1 )点击这里给我发消息

GMT+8, 2026-4-8 21:27 , Processed in 0.048242 second(s), 26 queries .

Powered by Discuz! X3.4 Licensed

© 2012-2025 Discuz! Team.

快速回复 返回顶部 返回列表