Import SQL file by command line in Windows 7(在 Windows 7 中通过命令行导入 SQL 文件)
问题描述
我想将一个 SQL 文件(大小 > 500MB)导入到数据库中.我的电脑上有 wamp.phpmyadmin 不能很好地处理这种大小.我更改了 php.ini 中的所有参数(max_upload_size 等).但它对我不起作用.所以我想通过命令行导入它.
I want to import an SQL file (size > 500MB) into a database. I have wamp on my PC. Phpmyadmin does not work well with this size. I changed all parameters in php.ini (max_upload_size etc.). But it does not work for me. So I want to import it by command line.
我使用这些命令导入文件:
I used these commands for import the file:
mysql -u root -p sysdat < D:NisargISPCDatabasesysdat.sql
mysql -u root -p -D sysdat < D:NisargISPCDatabasesysdat.sql
mysql -u root sysdat < D:NisargISPCDatabasesysdat.sql -p
这些都不起作用.
推荐答案
试试这个:
我认为您需要在命令行中使用完整路径,例如:
I think you need to use the full path at the command line, something like this, perhaps:
C:xamppmysqlinmysql -u {username} -p {databasename} < file_name.sql
另请参阅此链接:
http://www.ryantetek.com/2011/09/importing-large-sql-files-through-command-line-when-using-phpmyadminxampp/
这篇关于在 Windows 7 中通过命令行导入 SQL 文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:在 Windows 7 中通过命令行导入 SQL 文件


基础教程推荐
- MySQL 5.7参照时间戳生成日期列 2022-01-01
- 从字符串 TSQL 中获取数字 2021-01-01
- 如何在 CakePHP 3 中实现 INSERT ON DUPLICATE KEY UPDATE aka upsert? 2021-01-01
- MySQL根据从其他列分组的值,对两列之间的值进行求和 2022-01-01
- ORA-01830:日期格式图片在转换整个输入字符串之前结束/选择日期查询的总和 2021-01-01
- 使用 VBS 和注册表来确定安装了哪个版本和 32 位 2021-01-01
- 带更新的 sqlite CTE 2022-01-01
- CHECKSUM 和 CHECKSUM_AGG:算法是什么? 2021-01-01
- while 在触发器内循环以遍历 sql 中表的所有列 2022-01-01
- 带有WHERE子句的LAG()函数 2022-01-01