Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I am running wamp on my local host, the question is, how do I import 2GB mysql database backup file into phpmyadmin. I tried this command in mysql command line

mysql -u root -p databasename > D:/database.sql

but didn't work, is their any other way to do it?

share|improve this question

3 Answers 3

up vote 6 down vote accepted

Try reversing the redirection:

mysql -u root -p databasename < D:/database.sql

'>' means to redirect the stdout; '<' redirects stdin

If you are indeed using phpMyAdmin, as you say you are, you can log in to it with your same credentials and go to the "Import" tab (one before the last one) and upload the file.

share|improve this answer

Did you try Bigdump? This has nothing to do with PhpMyadmin but will stagger import a local file and tries to execute each set of lines in a session.

share|improve this answer

Restoring of mysql db from dump file:

mysql -u root -p databasename < D:/database.sql
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.
{"cc_re__cc_re__cc_by_sa_3_0": ["sites in the Stack Exchange network\">Area 51</a></li>\r\n                        <li><a href=\"//careers.stackoverflow.com?utm_source=stackoverflow.com&amp;utm_medium=site-ui&amp;utm_campaign=footerlink\">Stack Overflow Careers</a></li>\r\n                    \r\n                </ol>\r\n            </td>\r\n    </tr>\r\n</table>\r\n                </div>\r\n            </div>\r\n\r\n            <div id=\"copyright\">\r\n                site design / logo &#169; 2014 stack exchange inc; user contributions licensed under <a href=\"http://creativecommons.org/licenses/by-sa/3.0/\" rel=\"license\">cc by-sa 3.0</a>                   with <a href=\"http://blog.stackoverflow.com/2009/06/attribution-required/\" rel=\"license\">attribution required</a>\r\n            </div>\r\n            <div id=\"svnrev\">\r\n                rev 2014.12.24.2140\r\n            </div>\r\n            \r\n        </div>\r\n    </div>\r\n    <noscript>\r\n        <div id=\"noscript-warning\">Server Fault works best with JavaScript enabled<img src=\"http://pixel.quantserve.com/pixel/p-c1rF4kxgLUzNc.gif\" alt=\"\" class=\"dno\"></div>\r\n    </nosc"], "copyright__copyright__copyright": ["e this answer\n\nDid you try Bigdump? This has nothing to do with PhpMyadmin but will stagger import a local file and tries to execute each set of lines in a session.\n\nshare|improve this answer\n\nRestoring of mysql db from dump file:\n\nmysql -u root -p databasename < D:/database.sql\nshare|improve this answer\n\nYour Answer\n\n\u00a0\ndiscard\n\nBy posting your answer, you agree to the privacy policy and terms of service.\n\nNot the answer you're looking for? Browse other questions tagged or ask your own question."]}