找回密码
 注册
查看: 283|回复: 0

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

[复制链接]

40

主题

29

回帖

471

积分

新手上路

积分
471
发表于 2023-8-15 10:13:11 | 显示全部楼层 |阅读模式
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 directory5 ~( P, M9 Q9 Y, W! f# \) ~: R( R

' U3 Y3 D! \6 J+ ?: ?' O提示报错:( `5 I, l" M( V  Z1 t( i) I4 N) R
无法docker cp 容器里的文件到操作系统中:
9 ]- @) T/ V) B- b9 {3 ^# cdocker cp jms_mysql:/tmp/jumpserver.sql /tmp/7 V) }# L( }* E5 H1 m8 T6 [1 r
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) K1 `5 ^% T+ `! l' D

0 X, y+ B  @1 H5 N) J
$ @9 C  B/ }& N+ V+ l5 b解决办法就是
4 W# Z( O3 f3 \* tcd  /opt/jumpserver/config/mariadb/
0 u5 ]7 s  I& ?3 P% e- c- i cd  /opt/jumpserver/config/mariadb/9 M' W7 H1 N, o, h9 q
[root@localhost mariadb]# ls4 \5 s5 q# `' }% Y2 s, x' b' q
mariadb.cnf  ! n) S! C% S- E
[root@localhost mariadb]# ls
$ c  D7 A3 N" o7 M( j8 i4 Pmariadb.cnf  7 w8 G% ^* r+ E
7 c  n8 y# M" V3 h- ?
[root@localhost mariadb]#rm -rf mariadb.cnf
6 E! l  J! F6 `
& l4 m  t  _# l1 ]5 d创建一个mariadb.cnf文件
/ v/ a$ K9 c0 L# j
: t. c* L& E4 _8 P. Bvim mariadb.cnf$ S. h$ y6 n) Y7 U* W$ O- v
; E2 U8 _/ p# d0 Y- O, V
# The MariaDB configuration file
" Q7 V0 ~* g5 w( v2 u% Y#, S2 L3 q: ^. \# s
# The MariaDB/MySQL tools read configuration files in the following order:
/ J: t1 h  I* U2 _# 0. "/etc/mysql/my.cnf" symlinks to this file, reason why all the rest is read.
0 \% ?5 v& G& k" e( @/ U7 n# 1. "/etc/mysql/mariadb.cnf" (this file) to set global defaults,+ K) c* r$ G1 C  G4 e3 R
# 2. "/etc/mysql/conf.d/*.cnf" to set global options.
$ T& n% _% D) n+ E# 3. "/etc/mysql/mariadb.conf.d/*.cnf" to set MariaDB-only options.
" Q; [- h/ O0 `1 p1 }7 N* m$ M# 4. "~/.my.cnf" to set user-specific options.( c# C* L  i5 \7 u
#8 U$ N! Z  R9 k2 d+ S7 L) x* a
# If the same option is defined multiple times, the last one will apply.
: `% T" i9 K; L! N6 j- G## k6 U1 u# E7 N7 w
# One can use all long options that the program supports.
, H$ |6 X- A8 |9 u4 _, ~# i/ R# Run program with --help to get a list of available options and with
& m- k1 w3 N) r4 v# --print-defaults to see which it would actually understand and use.' {6 f* F- K, ~7 W2 o" Q
#
, I3 ]. M+ B, W" N% c0 O  N+ w8 v# If you are new to MariaDB, check out https://mariadb.com/kb/en/basic-mariadb-articles/
5 ]1 N$ ^4 @3 M' `- J) }
# v% {4 o' I/ [* A. z#
* O- v1 ]1 \& W( x! Q' G# This group is read both by the client and the server: Q; |$ u( d1 x# t- w/ |7 W
# use it for options that affect everything
# A( v2 u7 e) d" a: f+ [& [#9 h7 f# r5 w4 D6 O
[client-server]
" g3 R4 @# C# z4 K# Port or socket location where to connect
# p* ^( k2 n$ w: @# port = 33066 G0 Z* M- m1 {1 r4 G
socket = /run/mysqld/mysqld.sock
5 c; O/ R$ d/ c
+ D( |& ], J( i/ M; }0 T: |3 I- A# Import all .cnf files from configuration directory7 V6 A. R( Z; ^1 D2 o9 e- ^
[mariadbd]
: X0 I% r$ t  t3 \( d. Sskip-host-cache
* j6 {. t- Z; K7 Z9 Tskip-name-resolve
( Q* y. b, U8 _! i5 ^  A8 p- g0 @( B
!includedir /etc/mysql/mariadb.conf.d/
+ S* v8 l7 N4 y+ s( Q4 K$ F!includedir /etc/mysql/conf.d/
. s/ j0 v) A+ f$ M! c2 T
% P4 k6 f2 p3 L- x
. D5 @% O( N  Y9 t3 Y保存退出就可以解决问题。7 R- A8 o) y2 P  @6 q4 E4 n
再次docker cp就可以正常复制了。
4 v5 m5 x$ c5 N, P4 E$ w6 h0 a: w5 ?  k! o5 a
[root@localhost mariadb]# docker cp jms_mysql:/tmp/jumpserver.sql /tmp/' G* q* T# d' W" E1 s9 u% S
Successfully copied 2.96MB to /tmp/; D% u" x% e( L  k

. h7 t# p- V6 I* E/ Y3 a* r3 ?+ Y  g  M' Z7 E- b0 _* O- j
完美解决。1 J) K- Y0 C- A* v  V

) a6 B, i- T% ]; @+ j- p3 E' k( a/ }! @' \

$ v5 ?# j- q+ p3 z  G' z$ w- r, h
您需要登录后才可以回帖 登录 | 注册

本版积分规则

返回首页|Archiver|手机版|小黑屋|易陆发现技术论坛 ( 蜀ICP备2026014127号-1 )

GMT+8, 2026-6-12 01:22 , Processed in 0.016655 second(s), 21 queries .

Powered by Discuz! X5.0

© 2001-2026 Discuz! Team.

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