[臬榜- f6 G' w4 y6 ?1 v& ?$ y$ {
mysqldump -u userid -e -p db_Name > xxxxx.sql5 ^) J: E* a2 {) F- \8 ~
臬箔table:mysqldump -p -u userid dbname tablename > 52avtv_dzx20.201506242307.sql
9 E4 ~, ~9 Q9 L0 q& W: h臬箸鞈摨: mysqldump -p -u userid --all-databases > all-database.sql
( u9 ?5 O: e% h5 o+ x3 Q) j' O 雿,臬啁桃鞈摨怎雿輻刻撣唾撖蝣潭憿,隞仿舀鞈摨怠交,雿輻刻撣唾銋亙臬箸頛摰
4 A; } u2 `1 e& h+ d[芸臬箇瑽] : https://iter01.com/206843.html4 s! y' x; q! h
mysqldump--opt-d鞈摨怠-uroot-p>xxx.sql1 u7 t) r! d% Q+ O5 \- K
[芸臬箄]) h5 e0 Q3 B2 w8 T& V
mysqldump-t鞈摨怠-uroot-p>xxx.sql
+ L, a2 B" i& |; }
. x: b2 Q; N& m4 y- [7 P瘜冽: 嗡誑銝餈唳隞文隞賣蝬脩箇 "502 bad gateway",敶梢踹迸ginx,芾 --single-transaction --quick 撠勗末鈭,憒銝:: P& h) k2 Y+ f7 c2 R' M- z
mysqldump -u userid -e -p --single-transaction --quick db_Name > xxxxx.sql
}- G3 b% k$ W' W F憿:mysqldump: Got error: 1017: Can't find file: 'pre_forum_rsscache' (errno: 2) when using LOCK TABLES
0 Q' { ^/ S# |& O/ Z7 e/ {) jSol: 芾皂ysqldump銝--lock-tables=false撠勗臭誑閫瘙箏憿
3 f( T# j2 G w3 O) P9 i亥箇: 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 t1 I( w# X, Q" N7 R" n5 o
-rw-rw---- 1 mysql mysql 8852 Jun 3 16:05 pre_forum_rsscache.frm
' c; w( \6 a4 i9 i% L-rw-rw---- 1 mysql mysql 0 Jun 3 16:05 pre_forum_rsscache.MYD3 A. O& k9 h) @/ P5 [% q% C$ |
-rw-rw---- 1 mysql mysql 1024 Jun 3 16:05 pre_forum_rsscache.MYI
" f' `' t. _# m8 Z) s: sSol: - I% Q4 P# ~- j5 c
私hpmyadmin ==SQL 銝隞:6 q+ T. |; q+ j3 o
- 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
銴鋆賭誨蝣
k, o5 F5 \3 X P+ b9 y隞賢停甇撣訾
4 ` R, h. P4 H. \# t6 R S憿: 嗡蝙皂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)
3 T4 j) m) M9 j9 JSol: open_files_limit(default=962) 憭芸,寧4096,望澆撅祆廝ead-only,/etc/my.cnf
2 C: Z6 [* C1 [, A6 X- ?. ~嗅 service mariadb restart; ]5 |$ v' c# q% B, e, \
) s% G2 [" \9 `! ~) O
[璇隞嗅臬榜
' I! ~. g3 f! n5 Wmysqldump -u撣唾 -p撖蝣 -h銝餅 鞈摨 鞈銵 -w "sql璇隞" > 箄撓頝臬瑼獢
) Z9 P; [; L/ I4 X! B靘:+ G$ F! P# r; f" n, e; X
mysqldump -uroot -p123456 -hlocalhost -e AREA_UTF8 city -w "c_id<10 " > /home/web/a.txt
9 b8 _: k5 M' O# V
( I. O* X, ]+ F3 z" g--no-create-info嚗-t3 R8 b1 R: ^$ z* x6 C
芸箄嚗銝瘛餃 CREATE TABLE 隤伐憒撠箸澆搴QL隤伐芣insert into典
0 k7 s: w# s# P/ ?. j--no-data嚗-d, s7 [' l: l% j- Q
銝撠箔遙雿鞈嚗芸箄摨怎瑽9 h0 T, [4 J5 q# t# T2 y5 X6 ^
--quick嚗-q
1 M( r/ v7 G, z# Z" b$ P典箏之鞈敺剁撘瑕嗅 MySQL Server 亥岷敺閮湔亥撓綽銝臬敺閮敺摮刻園銝准5 h9 k) b0 x6 t' @
" _. l4 |) U3 O
) E+ e/ C1 C+ u4 W# w. Z: }[臬包" G: C3 d: f2 |) j5 Z& e# y1 {
mysql -u userid -p [-h localhost] db_Name < xxxxx.sql' @" |$ S5 w6 a! X: d7 u
臬交鞈摨: mysql -u userid -p < all-database.sql
6 ?7 B! Y/ O. m臬乩table :
( a; s h+ Z% V, dmysql -u userid -p -D dbname < cc5278_dzx20.ip2c.201506242307.sql
2 X5 X7 f8 G4 U1 n3 S) \. _P.S憒臬交憭芸之憒7GB,臬交獢銋瑁銝隞:
6 F- A# l' I% i: g, j8 h# jmysql -uroot -p -e "set global net_buffer_length=1000000; set global max_allowed_packet=1000000000;"
# V: ^1 L. m4 y! G- L: s& n6 \9 x2 a" z E {
[臬箏蝡喳臬亙啣虫唬蜓璈]7 W# i6 A5 d4 [. F
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 1 Q& ? X7 {! ]. m
[閮剖臬乩(批2Mb) by phpmyadmin]' F8 g% N. H9 s+ l0 v5 H2 a/ L3 x
http://www.av4u.info/forum.php?m ... e=1&extra=#pid203485 h5 r+ q& J# S" w9 M( b- h) G
0 l; z+ L+ D/ j6 g
. w0 O! X3 Q1 t! G/ J" i% e ]1 S% C; j4 m4 {
- D! ]# C1 v% R9 e D
3 o" G# t# n" M+ x N
8 i, M/ Y: Q: o. b, n1 S" c8 U
* Y8 C! I" ^1 F7 v
3 K4 _" Z# z1 u, d) r0 O& V+ w1 N1 T! m" m& Y$ R
* e6 S5 {& \( L9 i
7 g$ v2 L' s0 _5 N
( @: m. ^. r% s R" h
3 K8 R% y" D4 \7 Y3 @+ v
* C3 O" K- d& _ |
|