52AV璈A|52AV.ONE

 曉撖蝣
 蝡唾酉
敹急瑕
  • av隢憯BBS
  • 璈A
  • 芣瑟憭瘚
  • 鞎澆
  • 52av鋆貉摰
  • 銝剜-銝剖銝餅
     
亦: 3217|敺: 0
銝銝銝駁 銝銝銝駁

[mysql] MySQL 臬箏臬交隞

[銴鋆賡包
頝唾唳摰璅撅
璅銝
潸” 2015-6-23 08:22:56 | 芰閰脖 撣 |摨閬 |梯璅∪
[臬榜4 Y( J3 I* x: l4 K
mysqldump -u userid -e -p db_Name > xxxxx.sql% g% Y8 w+ D; U# J: H! E
臬箔table:mysqldump -p -u userid dbname tablename > 52avtv_dzx20.201506242307.sql8 a  ]( G/ j$ }3 U& ]  @4 F
臬箸鞈摨: mysqldump -p -u userid --all-databases > all-database.sql            , y. _9 C1 E$ \" J& D, \
       雿,臬啁桃鞈摨怎雿輻刻撣唾撖蝣潭憿,隞仿舀鞈摨怠交,雿輻刻撣唾銋亙臬箸頛摰
$ e. D# p# I  U6 @[芸臬箇瑽]  : https://iter01.com/206843.html
/ \, N* B4 Z8 ~0 _% u" \; a6 N* Tmysqldump--opt-d鞈摨怠-uroot-p>xxx.sql
" ?" q9 Z$ E- c9 B$ J% n9 [[芸臬箄]
3 e4 O/ b' \% Jmysqldump-t鞈摨怠-uroot-p>xxx.sql
! I3 x: k& S9 P- \! U- T0 T' b8 r/ I4 ^$ E
瘜冽:    嗡誑銝餈唳隞文隞賣蝬脩箇 "502 bad gateway",敶梢踹迸ginx,芾 --single-transaction --quick 撠勗末鈭,憒銝:
; Z; E( V! s1 O# {' b0 c7 E8 bmysqldump -u userid -e -p --single-transaction --quick db_Name > xxxxx.sql
; v$ ]* O6 F" o: z! B' `! {5 C憿:mysqldump: Got error: 1017: Can't find file: 'pre_forum_rsscache' (errno: 2) when using LOCK TABLES
- a4 U6 k+ `) t/ C  s* q; ^4 N% ySol: 芾皂ysqldump銝--lock-tables=false撠勗臭誑閫瘙箏憿
* i$ V0 }$ c8 w7 ]7 O0 G- T亥箇: mysqldump: Couldn't execute 'show create table `pre_forum_rsscache`': Can't find file: 'pre_forum_rsscache' (errno: 2) (1017),隞叼hpmyadmin餃交亦餌pre_forum_rsscache  雿輻其葉ls /var/lib/mysql/52avtv_dz/pre_forum_rsscache*  潛曉芣  pre_forum_rsscache.frm 1瑼獢 ,甇撣豢閰脰3瑼:8 H; @& d0 Z. W- s* L3 F: k# b
-rw-rw---- 1 mysql mysql 8852 Jun  3 16:05 pre_forum_rsscache.frm4 c0 k3 Z9 u  B. f  K: ^
-rw-rw---- 1 mysql mysql    0 Jun  3 16:05 pre_forum_rsscache.MYD) z- ^. c4 u, O0 M" L4 V
-rw-rw---- 1 mysql mysql 1024 Jun  3 16:05 pre_forum_rsscache.MYI8 v5 V1 b1 u! {% p! o
Sol:
! P$ S8 H0 S6 A- a7 S  n" Q
私hpmyadmin ==SQL 銝隞:' _' Z  p; d+ Z* n1 S) `. P9 D+ y
  1. DROP TABLE IF EXISTS pre_forum_rsscache;
  2. CREATE TABLE pre_forum_rsscache (
  3. lastupdate int(10) unsigned NOT NULL DEFAULT '0',
  4. fid mediumint(8) unsigned NOT NULL DEFAULT '0',
  5. tid mediumint(8) unsigned NOT NULL DEFAULT '0',
  6. dateline int(10) unsigned NOT NULL DEFAULT '0',
  7. forum char(50) NOT NULL DEFAULT '',
  8. author char(15) NOT NULL DEFAULT '',
  9. `subject` char(80) NOT NULL DEFAULT '',
  10. description char(255) NOT NULL DEFAULT '',
  11. guidetype char(10) NOT NULL DEFAULT '',
  12. UNIQUE KEY tid (tid),
  13. KEY fid (fid,dateline)
  14. ) ENGINE=MYISAM DEFAULT CHARSET=utf8
銴鋆賭誨蝣

) N2 N2 E: c  ~+ d: o隞賢停甇撣訾
) K8 e' p7 H: F( l! Y+ {6 n7 G憿:  嗡蝙皂ariadb 5.5.68  隞賣箇頡rror:mysqldump: Couldn't execute 'SHOW TRIGGERS LIKE 'pre\_portal\_topic\_pic'': Can't read dir of './db_name/' (errno: 24) (1018)
+ O& l& _2 q, `5 p0 G' p& NSol:  open_files_limit(default=962) 憭芸,寧4096,望澆撅祆廝ead-only,/etc/my.cnf
% O  R+ l* q5 }7 j# t" ~! y; E+ ]嗅 service mariadb restart
! g$ @8 z; X6 q& \* X$ u' k- C' r. @* i0 J
[璇隞嗅臬榜# t( _9 J7 B1 c' j
mysqldump -u撣唾 -p撖蝣 -h銝餅 鞈摨 鞈銵 -w "sql璇隞" > 箄撓頝臬瑼獢
$ B, l: Q; s& D  Y  O! ^: S0 _/ u9 E靘:6 f! c8 |5 q; C* Y8 A* q- ]
mysqldump -uroot -p123456 -hlocalhost -e AREA_UTF8 city -w "c_id<10 " > /home/web/a.txt
5 i" p/ D6 n! V; w3 p$ }. [7 P  j ) ^7 i/ n! W* @* H
--no-create-info嚗-t
1 }' U$ X$ D+ i& I+ _芸箄嚗銝瘛餃 CREATE TABLE 隤伐憒撠箸澆搴QL隤伐芣insert into典( F) [! ?) y4 `0 e8 g1 o% m
--no-data嚗-d
  f6 Z6 M# e$ C4 h7 I銝撠箔遙雿鞈嚗芸箄摨怎瑽6 {: ?# g0 ^: L" z$ h7 g2 {
--quick嚗-q
4 F( J7 R- h# Q9 B典箏之鞈敺剁撘瑕嗅 MySQL Server 亥岷敺閮湔亥撓綽銝臬敺閮敺摮刻園銝准
) `  {. W3 t4 f8 z
- p" [; U+ M1 n8 t6 g# h! Z' d9 I3 B
, i# y/ D+ K" Q0 A! D$ E[臬包, R7 T4 w) W" Q: d
mysql -u userid -p [-h localhost] db_Name < xxxxx.sql
6 m; ]7 U- |3 _4 a0 N6 f$ N臬交鞈摨:   mysql -u userid -p < all-database.sql
5 w* u( x9 m1 Y( \. U臬乩table :
' c5 U: y$ T, [( emysql -u userid -p -D dbname < cc5278_dzx20.ip2c.201506242307.sql
: Z6 R- K% M, Y" g9 AP.S憒臬交憭芸之憒7GB,臬交獢銋瑁銝隞:/ h0 _  @" Y, Y7 P, K
mysql -uroot -p -e "set global net_buffer_length=1000000; set global max_allowed_packet=1000000000;"$ E9 O) A& L/ d) r' P1 H- c- @" t% {- [

$ S. i( Y% A5 ]% O, w1 C/ L( V6 N) @$ d
[臬箏蝡喳臬亙啣虫唬蜓璈]3 ~2 c9 z0 O% \7 A
mysqldump -u [SOURCE_userid] -h [SOURCE_IP] -e -q --password=[SOURCE_PASSWORD] SOURCE_db_Name | mysql -u [DISTANCE_userid] --password=[DISTANCE_PASSWORD] -h [DISTANCE_IP] DISTANCE_db_Name
: ]/ _2 _8 L$ f1 s/ k- w2 V$ i[閮剖臬乩(批2Mb) by phpmyadmin]+ z( G1 I8 k& R6 M3 s2 S) _$ ?: @5 [
http://www.av4u.info/forum.php?m ... e=1&extra=#pid20348
/ w4 @( i' Z1 G  _, p: L) S7 E: Q# z. z! p. u! ^7 C& Z

0 K) O# e$ L: \3 K3 y. b6 Z1 g6 Q: b
8 X' D( ?% K9 [1 f# {/ H
3 O. V- v4 a& L# @& w

1 j1 L9 [# l/ K# I8 K/ @1 d
2 ~  _9 X; ]4 b- n! y  R2 c" D. u8 V$ A
- [' G9 Z: a& h: O. _

% v! _1 H: t3 x% J% _) `9 v. J- [! F, s, C4 N

9 |: ?5 n! T% f* @* v
# S, V( |* p* r- N# Z( C0 j* @' l+ l# \0 b; {* z& u1 m

雿輻券

祉蝛閬

BT蝳

砍憛批捆靘餉衣雯頝臬批捆蝝颲行粹嗥蝬脩嚗摰撟湔遛嚗嚗甇脖誑銝嗅啣摰嗆摰撟湧翩鈭箏ㄚ孵舫脣伐銝憿亙祉璇甈橘芣遛18甇 雓蝯脣亦閬賬粹脩芣遛18甇脖芣撟渡雯閬賜雯頝臭嗥批捆鞈閮嚗撱箄降典舫脰蝬脰楝批捆蝝蝯蝜ICRA蝝摰鋆閮剖 (粹蝯行霅 祉蝬脣銝蝝瘛函隢憯啣嚗祉閮剜蝞∠)

QQ|撠暺撅||52AV璈A

GMT+8, 2024-12-26 03:17 , Processed in 0.059635 second(s), 16 queries .

蝯∠.撱

[email protected] | QQ:2405733034     since 2015-01

鋆貉憒 敹恍敺 餈銵