使用phpmyadmin将大型数据库导入mysql的简单方法是什么? [英] What is the easy way to import large database to mysql using phpmyadmin?

查看:91
本文介绍了使用phpmyadmin将大型数据库导入mysql的简单方法是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要导入一个大小约为120M的数据库(sql文件),但是在phpmyAdmin中,不允许导入超过8 MB的数据库.

I need to import an database(sql file) which is about 120M is size, but in phpmyAdmin, it is not allowed to import more than 8 MB.

如何解决这个问题?

推荐答案

IIRC在PHPMyAdmin中没有限制,在MySQL中也没有限制-限制是POST大小(Web服务器配置)或文件上传大小(php.ini) ).如果您不能更改其中任何一个,则需要通过其他方式上载文件,然后....

IIRC there is no limit in PHPMyAdmin nor is there in MySQL - the limit is on the POST size (webserver config) or the file upload size (php.ini). If you can't change either of these, then you'll need to upload the file by other means then ....

mysql -u username -p <mysql_export_file.sql

如果您无法上传文件/没有外壳访问权限/没有可用的mysql客户端的CLI版本,那么接下来要尝试的就是查看您是否可以使用mysql cli客户端进行远程连接:

If you can't upload files / have no shell access / have no CLI version of the mysql client avaialable, then the next thing to try is to see whether you can connect remotely using the mysql CLI client:

mysql -u username -h www.example.com -p 

如果连接正常,则退出并再次运行,并在导出的文件中通过管道运行

If this connects OK, then exit and run it again piping in the exported file

mysql -u username -h www.example.com -p <mysql_export_file.sql

如果这不起作用,那么您需要将导出文件分成多个较小的块,或者编写自己的数据加载器以对数据进行点滴.

If that doesn't work then you'll need to either split the export file into multiple smaller chunks or write your own dataloader which trickles the data.

C.

这篇关于使用phpmyadmin将大型数据库导入mysql的简单方法是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆