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
-
Why use SQLYog, mysqldump is already an available command with server. e.g. mysqldump --opt --user=username --password database > dumbfile.sql – Himanshu Bhardwaj Mar 12 '13 at 05:23
-
Refer this http://stackoverflow.com/questions/7390203/how-can-i-import-a-mysql-dump – Dhinakar Mar 12 '13 at 05:24
6 Answers
In SQLyog there is an option - Tools -> Execute SQL script
. You can use this to run SQL scripts.

- 1,831
- 15
- 21
Why use SQLYog, mysqldump is already an available command with server.
mysqldump --opt --user=username --password database > dumbfile.sql
where dumbfile will be your sql file.
MYSQLDump command I have used it a lot to get databases export and is highly reliable.
And mysql command to import the same:
mysql -u root -p[root_password] [database_name] < dumpfilename.sql

- 4,038
- 3
- 17
- 36
-
-
1Yep @Devart is correct, here is correct command: mysql -u root -p[root_password] [database_name] < dumpfilename.sql – Himanshu Bhardwaj Mar 12 '13 at 08:06
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.

- 11,278
- 21
- 82
- 116

- 2,428
- 20
- 16
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.
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.

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