如何在PHPMyAdmin中运行大型SQL文件 [英] How to Run Large SQL File in PHPMyAdmin

查看:337
本文介绍了如何在PHPMyAdmin中运行大型SQL文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个巨大的(〜500mb)SQL文件,需要在我的数据库上运行.这是来自生产数据库的数据转储,我需要将其放入开发数据库中.通常,如果它较小,则将其粘贴到"SQL"选项卡中并运行它,但这肯定会炸毁我的浏览器.

I have a huge (~500mb) SQL file that I need to run on my database. It is a data dump from a production database that I need to put into my development database. Normally, if it were smaller, I'd paste it into the SQL tab and run it, but that would definitely blow up my browser.

如果我将该SQL文件导入到开发数据库中,就像运行SQL文件一样?还是将导入功能专门设置为导入整个数据库?

If I import that SQL file into the development database, is is just like running the SQL file? Or is the import function specifically set to import a whole database?

推荐答案

您应尝试从控制台导入它,因此您不必依赖文件上传限制:

You should try to import it from the console, so you do not depend on the file upload limitations:

C:>  mysql -u root -p < file.sql

这篇关于如何在PHPMyAdmin中运行大型SQL文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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