MySQL 如何将mysql转储导入到SQLyog

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/15353657/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-31 16:52:13  来源:igfitidea点击:

How to import mysql dump to SQLyog

mysqlsqlyog

提问by Php Geek

I have few sql dump files like the tables taken from other db. Now i want to update the tables into my server using the sqlyog. So can anyone help me out in importing .sql files into the SQLyog ??? Thank u in advance

我有几个 sql 转储文件,比如从其他数据库中获取的表。现在我想使用 sqlyog 将表更新到我的服务器中。那么任何人都可以帮助我将 .sql 文件导入 SQLyog 吗???提前谢谢你

回答by Jan S

In SQLyog there is an option - Tools -> Execute SQL script. You can use this to run SQL scripts.

在 SQLyog 中有一个选项 - Tools -> Execute SQL script. 您可以使用它来运行 SQL 脚本。

回答by Sathish D

In order to make it clear please refer the screenshot:

为了清楚起见,请参考截图:

enter image description here

在此处输入图片说明

回答by Himanshu Bhardwaj

Why use SQLYog, mysqldump is already an available command with server.

为什么使用SQLYog,mysqldump 已经是服务器可用的命令了。

mysqldump --opt --user=username --password database > dumbfile.sql

where dumbfile will be your sql file.

其中哑文件将是您的 sql 文件。

MYSQLDump commandI have used it a lot to get databases export and is highly reliable.

MYSQLDump 命令我经常使用它来导出数据库并且非常可靠。

And mysql command to import the same:

和mysql命令导入一样:

mysql -u root -p[root_password] [database_name] < dumpfilename.sql

回答by Pinkesh Sharma

In SQLyog there is an option - Tools -> Execute SQL script. If there are some Errors it will give you a pop up, then click on the "Open Error File button", it will give you error in the sql file.

在 SQLyog 中有一个选项 - Tools -> Execute SQL script. 如果有一些错误,它会给你一个弹出窗口,然后点击"Open Error File button",它会在 sql 文件中给你错误。

回答by Devart

I think you can open your SQL file in Query window, and just run it in SQLYog. Have a look at this documentation page - Executing SQL Queries.

我认为您可以在查询窗口中打开您的 SQL 文件,然后在 SQLYog 中运行它。看看这个文档页面 -执行 SQL 查询

Also, you can use mysql — The MySQL Command-Line Tool, or dbForge Studio for MySQL(free express edition) to execute SQL files against the MySQL database.

此外,您可以使用mysql — MySQL 命令行工具dbForge Studio for MySQL(免费快速版)来针对 MySQL 数据库执行 SQL 文件。

回答by Ahmad Abdul Haq

In SQLyog v7.14, run DB -> Restore from SQL Dump..., or just press Ctrl+Shift+Q.

在 SQLyog v7.14 中,运行 DB -> Restore from SQL Dump...,或者直接按 Ctrl+Shift+Q。