转至繁体中文版     | 网站首页 | 图文教程 | 资源下载 | 站长博客 | 图片素材 | 武汉seo | 武汉网站优化 | 
最新公告:     敏韬网|教学资源学习资料永久免费分享站!  [mintao  2008年9月2日]        
您现在的位置: 学习笔记 >> 图文教程 >> 数据库 >> MySql >> 正文
基於web頁面導入較大的sql腳本到mysql         ★★★★

基於web頁面導入較大的sql腳本到mysql

作者:闵涛 文章来源:闵涛的学习笔记 点击数:659 更新时间:2009/4/22 20:48:26

如果導出的數據庫sql文件較大,如果通過phpmyadmin導入,往往會失敗,而在虛擬主機上往往不具備shell權限,沒辦法從命令行導入,如果找服務商,一次二次還行,如果多次,我想對方臉色肯定不好看,算不定還要收費。

基於如此,需要找一個支持webase的大數據導入的工具,BigDump就是用於此目的的。

BigDump: Staggered MySQL Dump Importer

Staggered import of large and very large MySQL Dumps (like phpMyAdmin 2.x Dumps) even through the web-servers with hard runtime limit and those in safe mode. The script executes only a small part of the huge dump and restarts itself. The next session starts where the last was stopped.

軟件下載地址:http://www.ozerov.de/bigdump.zip

網址:http://www.ozerov.de/bigdump.php

常見問題:
Q: I get an error: "MySQL: Table ''''some_tbl_name'''' already exists". Why?

A: Your dump file doesn''''t contain DROP queries. Use phpMyAdmin to drop all the tables on the target database which must be restored before you start the import.

Q: I get an error: "Fatal error: Allowed memory size of xxx bytes exhausted" or "MySQL server has gone away". Why?

A: Your dump file probably contains extended inserts. An extended insert contains all table entries within one SQL query. BigDump isn''''t able to split such SQL queries. Please turn off extended inserts when exporting database from phpMyAdmin.

Q: Why does BigDump fail putting strange SQL errors if I run it from the localhost on my Windows PC?

A: This is IMHO a bug in the PHP 4.3.x that is crashing BigDump on Win32 if using a dump file with DOS encoded line breaks (contact me for details). As workaround create your dump with only the UNIX line breaks or convert it into UNIX format using some text editor. Then you will be able to run BigDump also at your localhost.

Q: Can I use dump files created by other software than phpMyAdmin?

A: You can use any text dump file at your own risk. Although it''''s very important for BigDump to find a semicolon followed by a line break at the end of each query. It won''''t work else since it has no time to parse the queries to find their proper ends. Further BigDump behaviour can be unpredictable if your dump file is using double quotes to surround strings. BigDump won''''t work too if your dump file contains any proprietary comment lines (like in some dumps created by other tools). Although you can use the $comment setting in bigdump.php to drop non-standard comment lines by their first characters. Apart from that BigDump doesn''''t filter the dump file in any way.

Q: Why don''''t you provide any facility to input the database configuration from the browser form?

A: Input the database configuration from the form would be very insecure since the settings must be saved in the cookies or returned to your browser everytime the session ends.


[MySql]PHP存取 Mysql 数据乱码终极解决方案  [Access]sql随机抽取记录
[MySql]解决Table xxx is marked as crashed and should …  [MySql][MySQL]快速解决"is marked as crashed and shoul…
[MySql]MySQL DELETE语法用法详解  [MySql]mysql中时间日期格式化
[Access]ASP&SQL让select查询结果随机排序的实现方法  [MySql]修改mysql导入文件大小限制
[其他]MySql常用命令大全  [Web开发]把ACCESS的数据导入到Mysql中的方法详解
教程录入:mintao    责任编辑:mintao 
  • 上一篇教程:

  • 下一篇教程:
  • 【字体: 】【发表评论】【加入收藏】【告诉好友】【打印此文】【关闭窗口
      注:本站部分文章源于互联网,版权归原作者所有!如有侵权,请原作者与本站联系,本站将立即删除! 本站文章除特别注明外均可转载,但需注明出处! [MinTao学以致用网]
      网友评论:(只显示最新10条。评论内容只代表网友观点,与本站立场无关!)

    同类栏目
    · Sql Server  · MySql
    · Access  · ORACLE
    · SyBase  · 其他
    更多内容
    热门推荐 更多内容
  • 没有教程
  • 赞助链接
    更多内容
    闵涛博文 更多关于武汉SEO的内容
    500 - 内部服务器错误。

    500 - 内部服务器错误。

    您查找的资源存在问题,因而无法显示。

    | 设为首页 |加入收藏 | 联系站长 | 友情链接 | 版权申明 | 广告服务
    MinTao学以致用网

    Copyright @ 2007-2012 敏韬网(敏而好学,文韬武略--MinTao.Net)(学习笔记) Inc All Rights Reserved.
    闵涛 投放广告、内容合作请Q我! E_mail:admin@mintao.net(欢迎提供学习资源)

    站长:MinTao ICP备案号:鄂ICP备11006601号-18

    闵涛站盟:医药大全-武穴网A打造BCD……
    咸宁网络警察报警平台