[原创]如何用PHPMyAdmin进行MySQL的数据导入导出

软件与互联网技术
Admin
Advanced Member
Posts: 89
Joined: Thu May 13, 2004 11:56 am

[原创]如何用PHPMyAdmin进行MySQL的数据导入导出

Post by Admin »

原创文章,欢迎转载,请注明转源

应朋友要求,把这过程写一下,本人其实也是只菜鸟,不过老了一些有点咬不动:D

先来备份数据。首先进入界面,由这两处进入你要备份的数据库。

Before the backup and restoring job, let us pick the desired database first by the drop-down menu or the right-column short-cut link.

Image
Admin
Advanced Member
Posts: 89
Joined: Thu May 13, 2004 11:56 am

Post by Admin »

现在选择图中的导出项,因为首先要做的是数据备份(不做这一步我哪儿有东东往里重灌哪?)

The latest version of PHPMyAdmin DOES support Chinese, but with default lang as still Eng ISO 8859-1, so get the Export button as the pointing arrow shows you.

Image
Admin
Advanced Member
Posts: 89
Joined: Thu May 13, 2004 11:56 am

Post by Admin »

注意如图中四处绿箭头所指,一,你要备份导出的是哪些表,这里我全选,当然也可以只选自己要的;二,最好加上那个清空表的选项,这样的好处可能是把待处理的目的表自动处理吧。最后就是保存成文件输出。

Let me take a dummy's step. 1st step is to check all the four CheckBoxes as directed to make it sure you will not miss any single table and all the options MySQL requires in processing the job. 2nd, to save it as a single file you needa have to check the save to/as file option, and when pressing GO, you will be prompted to save the packaged file to your destination dir.

Image
Admin
Advanced Member
Posts: 89
Joined: Thu May 13, 2004 11:56 am

Post by Admin »

第一步,点选数据库名,准备将数据重灌入这个数据库里,由于之前已经设定过加入Drop Table的选项,这里就不用将所有数据清空Drop了。

第二步,点了上方的SQL后出现如图的界面,这时如果你的数据库文件比较大,确保第三项绿箭头处的限制一定大于你要上传文件的大小。

第三步,就是浏览找到要上传的那个数据库文件,一般就是以SQL为后缀的刚才我们备份过的文件。在WIN里看到的图标是文本文件的ICON,但其实它是个数据库文件。

Pick the database from left column and then the SQL button. Ensure that upload file limit is above the uploaded database file(s) or otherwise you may destroy you target database/tables. When the shown interface/webpage loaded, browse and locate you sql file and then click GO...It is possible that you have to wait a few seconds before seeing the success information that will be appeared at the top.

Image

Who is online

Users browsing this forum: No registered users and 0 guests