[臬榜7 Z; z S1 V9 ]7 ?
mysqldump -u userid -e -p db_Name > xxxxx.sql: W3 {, Q2 b F$ p- V
臬箔table:mysqldump -p -u userid dbname tablename > 52avtv_dzx20.201506242307.sql' }% t9 ^3 e% C; s1 y
臬箸鞈摨: mysqldump -p -u userid --all-databases > all-database.sql
7 { c. f5 W% I" _5 g( F$ B& W 雿,臬啁桃鞈摨怎雿輻刻撣唾撖蝣潭憿,隞仿舀鞈摨怠交,雿輻刻撣唾銋亙臬箸頛摰7 M& d! Y! X- B. V+ h! u/ Q
[芸臬箇瑽] : https://iter01.com/206843.html2 w% G( g; k# ^0 m9 H2 R/ f
mysqldump--opt-d鞈摨怠-uroot-p>xxx.sql4 h1 v% \- e, K3 b. b9 A1 T
[芸臬箄]3 B' D* a7 ]9 a& W* H& I! y) j) W3 D
mysqldump-t鞈摨怠-uroot-p>xxx.sql" }6 J* ]: p% W
, a( W; v, W! o; \& O5 h
瘜冽: 嗡誑銝餈唳隞文隞賣蝬脩箇 "502 bad gateway",敶梢踹迸ginx,芾 --single-transaction --quick 撠勗末鈭,憒銝:7 W7 |+ f0 N8 x% h/ b
mysqldump -u userid -e -p --single-transaction --quick db_Name > xxxxx.sql& a' k! a1 s0 S8 N
憿:mysqldump: Got error: 1017: Can't find file: 'pre_forum_rsscache' (errno: 2) when using LOCK TABLES
' o! P2 g. M, p+ b3 pSol: 芾皂ysqldump銝--lock-tables=false撠勗臭誑閫瘙箏憿) Q7 \2 {" m; u7 N, V
亥箇: 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瑼:
; i P) B8 J5 h: \-rw-rw---- 1 mysql mysql 8852 Jun 3 16:05 pre_forum_rsscache.frm- W2 r/ c$ P& _1 ^' T* _
-rw-rw---- 1 mysql mysql 0 Jun 3 16:05 pre_forum_rsscache.MYD, e' t+ i+ l, ?7 r; g3 z
-rw-rw---- 1 mysql mysql 1024 Jun 3 16:05 pre_forum_rsscache.MYI
/ K! n5 a. v8 i, B3 M+ y1 S. vSol: - k% m+ ?. T+ O5 D2 m# ^) g7 D
私hpmyadmin ==SQL 銝隞:* P$ g" q1 X" M2 s( `
- DROP TABLE IF EXISTS pre_forum_rsscache;
- CREATE TABLE pre_forum_rsscache (
- lastupdate int(10) unsigned NOT NULL DEFAULT '0',
- fid mediumint(8) unsigned NOT NULL DEFAULT '0',
- tid mediumint(8) unsigned NOT NULL DEFAULT '0',
- dateline int(10) unsigned NOT NULL DEFAULT '0',
- forum char(50) NOT NULL DEFAULT '',
- author char(15) NOT NULL DEFAULT '',
- `subject` char(80) NOT NULL DEFAULT '',
- description char(255) NOT NULL DEFAULT '',
- guidetype char(10) NOT NULL DEFAULT '',
- UNIQUE KEY tid (tid),
- KEY fid (fid,dateline)
- ) ENGINE=MYISAM DEFAULT CHARSET=utf8
銴鋆賭誨蝣
7 Q0 U( B& b- X& n8 n' }& v隞賢停甇撣訾
- V& W1 q7 z1 @, u憿: 嗡蝙皂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)
: V2 n" `" y6 S9 g3 iSol: open_files_limit(default=962) 憭芸,寧4096,望澆撅祆廝ead-only,/etc/my.cnf & j; Q8 T2 U# J3 Y$ |. ?
嗅 service mariadb restart
( Y: |! b; G! b2 I; ?$ R1 [: F& v6 h j3 Q
[璇隞嗅臬榜) N1 x* z. |/ l* A) `: J2 L4 B
mysqldump -u撣唾 -p撖蝣 -h銝餅 鞈摨 鞈銵 -w "sql璇隞" > 箄撓頝臬瑼獢1 }/ A( R, f3 W: n0 D
靘:
% ~1 O+ U. k' J- y& @7 l6 Smysqldump -uroot -p123456 -hlocalhost -e AREA_UTF8 city -w "c_id<10 " > /home/web/a.txt
# s% ]7 k, } K2 ` 6 y5 B) n! `! _6 `. E
--no-create-info嚗-t* W% r% R. |# F7 [
芸箄嚗銝瘛餃 CREATE TABLE 隤伐憒撠箸澆搴QL隤伐芣insert into典
' l6 p' d- i/ e0 o: M& S--no-data嚗-d
: i% ]7 W. v6 X4 F銝撠箔遙雿鞈嚗芸箄摨怎瑽
+ ?4 D8 _1 Q7 @6 `--quick嚗-q
- ]. W% B l* D1 Q/ E典箏之鞈敺剁撘瑕嗅 MySQL Server 亥岷敺閮湔亥撓綽銝臬敺閮敺摮刻園銝准& u. I. I4 b; O8 Z& L4 X
- x( P# ?/ m: U( I ^! ?! H+ h. L
1 c9 U$ h8 X7 C8 @8 G[臬包
3 B* n! F. S) s% o& S8 Amysql -u userid -p [-h localhost] db_Name < xxxxx.sql
- V+ D/ Q. C' m0 I0 w5 l臬交鞈摨: mysql -u userid -p < all-database.sql F! @, X. s$ F/ M
臬乩table :2 v- d/ b3 d4 V& f: N$ ?8 r& a% L. D3 E
mysql -u userid -p -D dbname < cc5278_dzx20.ip2c.201506242307.sql
9 C& L* R* u" {4 ~# |0 \! EP.S憒臬交憭芸之憒7GB,臬交獢銋瑁銝隞:5 l* r( f& ]4 y. m" ^* t
mysql -uroot -p -e "set global net_buffer_length=1000000; set global max_allowed_packet=1000000000;"
" E w8 O' U6 [2 x7 q' [: Z
G7 E1 [8 Z. u4 C[臬箏蝡喳臬亙啣虫唬蜓璈]
) y: Z/ a% n# o" pmysqldump -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
, v( s- U* f4 Z6 c8 z, L[閮剖臬乩(批2Mb) by phpmyadmin]4 z1 s0 O6 d4 C: [* N1 H: m9 F
http://www.av4u.info/forum.php?m ... e=1&extra=#pid203482 |8 l# S, d, T& ~) g4 S
3 Q6 ^4 P0 R1 W/ y4 Z/ T K _8 i! f0 t5 I+ A* X, C
4 d5 R& g+ u. t$ H4 X. F; I( X1 p
& X* @( p; ]1 H4 S% _+ O) I+ _5 H& S
& i4 J" [9 H ]
4 y7 y* q! O9 e( V1 \6 B9 j% \: S4 f9 E+ b' ~
" o& G* _/ O9 O3 h$ ~& Y3 a& o% A% ]7 \9 V4 S3 {5 v: W
9 D7 n# G6 y y2 l) V" O
. b( S) e5 n% M( @9 Z
8 B7 i2 D# g9 o) e% }: d( [
2 B6 J+ Z! p& T- s2 U. }8 [4 C" [3 U% P/ s: B
|
|