`
happmaoo
  • 浏览: 4310056 次
  • 性别: Icon_minigender_1
  • 来自: 杭州
社区版块
存档分类
最新评论

PhpMyadmin超重数据导入zt

阅读更多

PhpMyadmin超重数据导入zt


phpMyAdmin(官方站点:http://www.phpMyAdmin.net _ IqB )是在线管理MySQL数据库的工具,当用它来导入超过2MB的数据库文件时,往往会因为受PHP.ini上传文件大小的限制而无法导入。
(D?9#?Ucb 在一些教程类网站上看到有人自作聪明地修改PHP.ini文件,或者是教大家用命令行工具进行导入,但如果是租用了虚拟主机,没有服务器最高管理权限,无 法修改PHP.ini文件,更无法使用命令行该怎么办?其实读读phpMyAdmin在线帮助文档,里面早就说明了这个问题的解决方法。
在phpMyAdmin目录下新建一个目录,如:jonson,再编辑phpMyAdmin目录下libraries\config.default.php文件,查找$cfg['UploadDir'],将其值写为新建目录的名称,如下所示:复制内容到剪贴板代码: *1]91
$cfg['UploadDir'] = 'jonson'; // Directory for uploaded files that can be executed by I2yfz0D
// phpMyAdmin. For example './upload'. Leave empty for &=C i75
// no upload directory support. Use %u for username z6e{deih
// inclusion. kA&Y^~"
$cfg['SaveDir'] = ''; // Directory where phpMyAdmin can save exported data on {rT{I?UAn
// server. For example './save'. Leave empty for no save ];CSz<x/
// directory support. Use %u for username inclusion. y|V -N
$cfg['docSQLDir'] = ''; // Directory for docSQL imports, phpMyAdmin can import @|qmf\
// docSQL files from that directory. For example hN!V^OT
// './docSQL'. Leave empty for no docSQL import support. `r~P\<
$cfg['TempDir'] = ''; // Directory where phpMyAdmin can save temporary files. &*7.:E{
// This is needed for MS Excel export, see documentation s |38<V
// how to enable that.
EUD.<f
将要导入到数据库的文件上传到刚才新建的jonson文件夹中,登录phpMyAdmin,选择你的数据库,在右侧窗口中点击“import(导入)”,这时你会发现导入界面中多了一个“网站服务器上载目录”选项,点击下拉箭头,列表里会有刚才上传的文件名称列表。
]D%/l/Q\C
选中文件,点击右下角的“执行”按钮,等待一段时间(等待的时间与导入文件体积成正比)即可完成“超重”文件的导入。
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics