{"id":322,"date":"2022-04-01T22:42:46","date_gmt":"2022-04-01T15:42:46","guid":{"rendered":"http:\/\/congdong.longvan.net\/?p=322"},"modified":"2022-04-04T12:08:46","modified_gmt":"2022-04-04T05:08:46","slug":"huong-dan-import-export-database-trong-phpmyadmin","status":"publish","type":"post","link":"https:\/\/longvan.net\/cong-dong\/huong-dan-import-export-database-trong-phpmyadmin\/","title":{"rendered":"H\u01b0\u1edbng d\u1eabn import \/ export database trong phpMyAdmin"},"content":{"rendered":"<div>\n<h5>I. T\u1ed5ng quan:<\/h5>\n<p>PhpMyAdmin l\u00e0 ph\u1ea7n m\u1ec1m m\u00e3 ngu\u1ed3n m\u1edf \u0111\u01b0\u1ee3c vi\u1ebft b\u1eb1ng ng\u00f4n ng\u1eef PHP gi\u00fap qu\u1ea3n tr\u1ecb c\u1edf s\u1edf d\u1eef li\u1ec7u MySQL th\u00f4ng qua giao di\u1ec7n web.<\/p>\n<p>M\u1ed9t s\u1ed1 t\u00ednh n\u0103ng chung th\u01b0\u1eddng \u0111\u01b0\u1ee3c s\u1eed d\u1ee5ng tr\u00ean phpMyAdmin:<\/p>\n<ul>\n<li>Qu\u1ea3n l\u00fd user(ng\u01b0\u1eddi d\u00f9ng): th\u00eam, x\u00f3a, s\u1eeda(ph\u00e2n quy\u1ec1n).<\/li>\n<li>Qu\u1ea3n l\u00fd c\u01a1 s\u1edf d\u1eef li\u1ec7u: t\u1ea1o m\u1edbi, x\u00f3a, s\u1eeda, th\u00eam b\u1ea3ng, h\u00e0ng, tr\u01b0\u1eddng, t\u00ecm ki\u1ebfm \u0111\u1ed1i t\u01b0\u1ee3ng.<\/li>\n<li>Nh\u1eadp xu\u1ea5t d\u1eef li\u1ec7u(Import\/Export): h\u1ed7 tr\u1ee3 c\u00e1c \u0111\u1ecbnh d\u1ea1ng SQL, XML v\u00e0 CSV.<\/li>\n<li>Th\u1ef1c hi\u1ec7n c\u00e1c truy v\u1ea5n MySQL, gi\u00e1m s\u00e1t qu\u00e1 tr\u00ecnh v\u00e0 theo d\u00f5i.<\/li>\n<li>Sao l\u01b0u v\u00e0 kh\u00f4i ph\u1ee5c(Backup\/Restore): Thao t\u00e1c th\u1ee7 c\u00f4ng.<\/li>\n<\/ul>\n<h5>II. H\u01b0\u1edbng d\u1eabn import \/ export database trong phpMyadmin:<\/h5>\n<ol>\n<li><strong>Import d\u1eef li\u1ec7u:<\/strong>\n<ul>\n<li><strong>B\u01b0\u1edbc 1:<\/strong> Truy c\u1eadp v\u00e0o phpMyadmin<\/li>\n<li><strong>B\u01b0\u1edbc 2:<\/strong> X\u00f3a d\u1eef li\u1ec7u c\u0169 tr\u01b0\u1edbc khi import d\u1eef li\u1ec7u m\u1edbi l\u00ean<br \/>\n<strong>L\u01b0u \u00fd: n\u1ebfu b\u1ea1n t\u1ea1o m\u1edbi m\u1ed9t database \u0111\u1ec3 nh\u1eadp th\u00ec c\u00f3 th\u1ec3 b\u1ecf qua b\u01b0\u1edbc n\u00e0y.<\/strong><\/p>\n<ul>\n<li>Khi \u0111\u00e3 v\u00e0o \u0111\u01b0\u1ee3c giao di\u1ec7n phpMyAdmin \u0111\u1ec3 qu\u1ea3n l\u00fd database c\u1ee7a b\u1ea1n, ti\u1ebfn h\u00e0nh import database MySQL. N\u1ebfu database \u0111ang ch\u1ee9a d\u1eef li\u1ec7u, \u0111i\u1ec1u \u0111\u1ea7u ti\u00ean c\u1ea7n th\u1ef1c hi\u1ec7n l\u00e0 x\u00f3a t\u1ea5t c\u1ea3 c\u00e1c d\u1eef li\u1ec7u c\u1ee7a database n\u00e0y tr\u01b0\u1edbc khi nh\u1eadp n\u1ebfu kh\u00f4ng c\u00f3 th\u1ec3 g\u1eb7p l\u1ed7i. \u0110\u1ec3 x\u00f3a c\u00e1c d\u1eef li\u1ec7u c\u00f3 s\u1eb5n, ch\u1ecdn database c\u1ee7a b\u1ea1n:\n<p><img decoding=\"async\" src=\"https:\/\/longvan.net\/cong-dong\/wp-content\/uploads\/2022\/02\/image-1644391738855.png\" alt=\"image-1644391738855.png\"><\/li>\n<li>B\u1ea5m v\u00e0o m\u1ee5c Select all \u0111\u1ec3 ch\u1ecdn t\u1ea5t c\u1ea3 c\u00e1c table v\u00e0 nh\u1ea5n n\u00fat Drop nh\u01b0 h\u00ecnh b\u00ean tr\u00ean \u0111\u1ec3 ti\u1ebfn h\u00e0nh x\u00f3a t\u1ea5t c\u1ea3 c\u00e1c d\u1eef li\u1ec7u hi\u1ec7n c\u00f3. B\u1ea1n ch\u1ec9 th\u1ef1c hi\u1ec7n b\u01b0\u1edbc n\u00e0y khi mu\u1ed1n nh\u1eadp l\u1ea1i database cho m\u1ed9t database \u0111\u00e3 c\u00f3 d\u1eef li\u1ec7u tr\u01b0\u1edbc \u0111\u00f3.\n<p><img decoding=\"async\" src=\"https:\/\/longvan.net\/cong-dong\/wp-content\/uploads\/2022\/02\/image-1644391822360.png\" alt=\"image-1644391822360.png\"><\/li>\n<li>Click \u201cyes\u201d \u0111\u1ec3 ch\u1eafc ch\u1eafn r\u1eb1ng mu\u1ed1n x\u00f3a d\u1eef li\u1ec7u c\u0169 \u0111i.\n<p><img decoding=\"async\" src=\"https:\/\/longvan.net\/cong-dong\/wp-content\/uploads\/2022\/02\/image-1644391857690.png\" alt=\"image-1644391857690.png\"><\/li>\n<\/ul>\n<\/li>\n<li><strong>B\u01b0\u1edbc 3:<\/strong> Import d\u1eef li\u1ec7u v\u00e0o:\n<ul>\n<li>Sau khi x\u00f3a database, h\u00e3y ti\u1ebfp t\u1ee5c ch\u1ecdn Import \u1edf menu ngang b\u00ean tr\u00ean. Ch\u1ecdn \u201c Choose File \u201c sau \u0111\u00f3 ch\u1ecdn file \u0111\u1ecbnh d\u1ea1ng .sql ho\u1eb7c .sql.zip t\u1eeb m\u00e1y c\u00e1 nh\u00e2n \u0111\u1ec3 ti\u1ebfn h\u00e0nh upload database l\u00ean h\u1ec7 th\u1ed1ng server.<br \/>\n<img decoding=\"async\" src=\"https:\/\/longvan.net\/cong-dong\/wp-content\/uploads\/2022\/02\/image-1644391894582.png\" alt=\"image-1644391894582.png\"><\/li>\n<li>Sau khi c\u00f3 file nh\u1ea5n Go ti\u1ebfp ti\u1ebfn h\u00e0nh import DB.<br \/>\n<img decoding=\"async\" src=\"https:\/\/longvan.net\/cong-dong\/wp-content\/uploads\/2022\/02\/image-1644392048217.png\" alt=\"image-1644392048217.png\"><\/li>\n<li>D\u1eef li\u1ec7u \u0111\u00e3 import th\u00e0nh c\u00f4ng.<br \/>\n<img decoding=\"async\" src=\"https:\/\/longvan.net\/cong-dong\/wp-content\/uploads\/2022\/02\/image-1644392069717.png\" alt=\"image-1644392069717.png\"><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<li><strong>Export d\u1eef li\u1ec7u:<\/strong>\n<ul>\n<li>Vi\u1ec7c xu\u1ea5t ra database c\u0169ng \u0111\u01b0\u1ee3c th\u1ef1c hi\u1ec7n t\u01b0\u01a1ng t\u1ef1 nh\u01b0 l\u00fac nh\u1eadp.<\/li>\n<li>C\u01a1 b\u1ea3n b\u1ea1n ch\u1ec9 c\u1ea7n ch\u1ecdn database c\u1ea7n export v\u00e0 truy c\u1eadp v\u00e0o giao di\u1ec7n phpMyAdmin c\u1ee7a database \u0111\u00f3. Sau \u0111\u00f3 ch\u1ecdn m\u1ee5c <strong>Export<\/strong>&nbsp;\u1edf menu ngang b\u00ean tr\u00ean, c\u00e1c t\u00f9y ch\u1ecdn kh\u00e1c \u0111\u1ec3 m\u1eb7c \u0111\u1ecbnh r\u1ed3i nh\u1ea5p n\u00fat&nbsp;<strong>Go<\/strong>&nbsp;\u0111\u1ec3 Export database MySQL v\u1ec1 m\u00e1y t\u00ednh.<br \/>\n<img decoding=\"async\" src=\"https:\/\/longvan.net\/cong-dong\/wp-content\/uploads\/2022\/02\/image-1644392167282.png\" alt=\"image-1644392167282.png\"><br \/>\n<img decoding=\"async\" src=\"https:\/\/longvan.net\/cong-dong\/wp-content\/uploads\/2022\/02\/image-1644392187674.png\" alt=\"image-1644392187674.png\"><br \/>\n<img decoding=\"async\" src=\"https:\/\/longvan.net\/cong-dong\/wp-content\/uploads\/2022\/02\/image-1644392202916.png\" alt=\"image-1644392202916.png\"><\/li>\n<li>Export th\u00e0nh c\u00f4ng th\u00ec s\u1ebd c\u00f3 1 file \u0111\u01b0\u1ee3c t\u1ea3i v\u1ec1 m\u00e1y.<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<p>Nh\u01b0 v\u1eady, Long V\u00e2n \u0111\u00e3 ho\u00e0n th\u00e0nh h\u01b0\u1edbng d\u1eabn c\u00e1c b\u1ea1n import \/ export database trong phpMyAdmin. Ch\u00fac c\u00e1c b\u1ea1n th\u00e0nh c\u00f4ng !<\/p>\n<\/div>\n<p class=\"wpss_copy\">&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I. T\u1ed5ng quan: PhpMyAdmin l\u00e0 ph\u1ea7n m\u1ec1m m\u00e3 ngu\u1ed3n m\u1edf \u0111\u01b0\u1ee3c vi\u1ebft b\u1eb1ng ng\u00f4n ng\u1eef PHP gi\u00fap qu\u1ea3n tr\u1ecb c\u1edf s\u1edf d\u1eef li\u1ec7u MySQL th\u00f4ng qua giao di\u1ec7n web. M\u1ed9t s\u1ed1 t\u00ednh n\u0103ng chung th\u01b0\u1eddng \u0111\u01b0\u1ee3c s\u1eed d\u1ee5ng tr\u00ean phpMyAdmin: Qu\u1ea3n l\u00fd user(ng\u01b0\u1eddi d\u00f9ng): th\u00eam, x\u00f3a, s\u1eeda(ph\u00e2n quy\u1ec1n). Qu\u1ea3n l\u00fd c\u01a1 s\u1edf d\u1eef li\u1ec7u: t\u1ea1o [&#8230;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_oasis_is_in_workflow":0,"_oasis_original":0,"footnotes":""},"categories":[40],"tags":[],"class_list":["post-322","post","type-post","status-publish","format-standard","hentry","category-web-hosting"],"_links":{"self":[{"href":"https:\/\/longvan.net\/cong-dong\/wp-json\/wp\/v2\/posts\/322","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/longvan.net\/cong-dong\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/longvan.net\/cong-dong\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/longvan.net\/cong-dong\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/longvan.net\/cong-dong\/wp-json\/wp\/v2\/comments?post=322"}],"version-history":[{"count":4,"href":"https:\/\/longvan.net\/cong-dong\/wp-json\/wp\/v2\/posts\/322\/revisions"}],"predecessor-version":[{"id":341,"href":"https:\/\/longvan.net\/cong-dong\/wp-json\/wp\/v2\/posts\/322\/revisions\/341"}],"wp:attachment":[{"href":"https:\/\/longvan.net\/cong-dong\/wp-json\/wp\/v2\/media?parent=322"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/longvan.net\/cong-dong\/wp-json\/wp\/v2\/categories?post=322"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/longvan.net\/cong-dong\/wp-json\/wp\/v2\/tags?post=322"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}