What is the easy way to import large database to mysql using phpmyadmin?(使用 phpmyadmin 将大型数据库导入 mysql 的简单方法是什么?)
问题描述
我需要导入一个大约 120M 的数据库(sql 文件),但是在 phpmyAdmin 中,不允许导入超过 8MB.
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 大小(网络服务器配置)或文件上传大小(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
如果你不能上传文件/没有shell访问权限/没有可用的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 的简单方法是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:使用 phpmyadmin 将大型数据库导入 mysql 的简单方法是什么?


- 以一个值为轴心,但将一行上的数据按另一行分组? 2022-01-01
- 如何将 SonarQube 6.7 从 MySQL 迁移到 postgresql 2022-01-01
- 如何使用 pip 安装 Python MySQLdb 模块? 2021-01-01
- SQL 临时表问题 2022-01-01
- 在SQL中,如何为每个组选择前2行 2021-01-01
- 使用 Oracle PL/SQL developer 生成测试数据 2021-01-01
- 如何将 Byte[] 插入 SQL Server VARBINARY 列 2021-01-01
- 更改自动增量起始编号? 2021-01-01
- 远程 mySQL 连接抛出“无法使用旧的不安全身份验证连接到 MySQL 4.1+"来自 XAMPP 的错误 2022-01-01
- 导入具有可变标题的 Excel 文件 2021-01-01