简体   繁体   English

用phpmyadmin导出数据库

[英]Exporting a database with phpmyadmin

I followed some instructions over the net how to export your database. 我在网上遵循了一些说明,以了解如何导出数据库。 When I finished the adminitration I got this txt file: 完成管理后,我得到了以下txt文件:

-- phpMyAdmin SQL Dump


SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";


/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;



DROP TABLE IF EXISTS `article`;
CREATE TABLE IF NOT EXISTS `article` (
  `Title` varchar(200) NOT NULL,
  `article_id` int(11) NOT NULL AUTO_INCREMENT,
  `Article` text NOT NULL,
  `Topics` varchar(100) NOT NULL,
  `author` varchar(100) NOT NULL,
  `page` int(11) NOT NULL,
  `tpage` int(11) NOT NULL,
  PRIMARY KEY (`article_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;






DROP TABLE IF EXISTS `comments`;
CREATE TABLE IF NOT EXISTS `comments` (
  `comments_id` int(11) NOT NULL AUTO_INCREMENT,
  `comment` varchar(1000) NOT NULL,
  `article_id` int(11) NOT NULL,
  `name` varchar(100) NOT NULL,
  PRIMARY KEY (`comments_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

Was the export successful. 出口成功了吗? Is it only a textfile.. that I use to pass between computers or upload to a hosting site? 我只是用来在计算机之间传递或上传到托管站点的文本文件吗?

Was the export successful. 出口成功了吗?

It looks like it, at least as far as the table structure is concerned. 看起来,至少就表结构而言。 If the table contained data and you want that to be included, you may need to refine your command line settings. 如果该表包含数据,并且您希望包含该数据,则可能需要优化命令行设置。 If you need suggestions on how to do that, show how you do the export. 如果您需要有关如何执行操作的建议,请显示如何进行导出。

Is it only a textfile.. that I use to pass between computers or upload to a hosting site? 我只是用来在计算机之间传递或上传到托管站点的文本文件吗?

Yes, that's basically the idea of a mySQL dump - that's fine. 是的,基本上就是mySQL转储的想法-很好。

If it's big and you need to transport it through the web, mySQL dumps (as long as they don't contain a lot of BLOB data) compress very well, eg using gzip. 如果很大,并且您需要通过网络进行传输,则mySQL转储(只要它们不包含大量的BLOB数据)可以很好地压缩,例如使用gzip。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM