Freelancer Martin Zeller

php asp.net java c# .net c++ xml xhtml seo magento zend framework dotnetnuke tomcat iis sql server mysql oracle typo3 coremedia

MySQL: import a dump

Tags:

If you have got a sql-File and want to import it to your MySQL database then you can do this with a simple line in the shell:

mysql -u username -p password -h databaseservername  datebasename < sqlfile.sql

Example:
Say there is a local MySQL database, with a database called ‘mybestsellers’, we have got a dump file ‘/home/users/jripper/bestsellerdump.sql’ and we connect to our database with username ‘dbuser’ and password ‘xxx’
Our input at the shell would be:

mysql -u dbuser -p xxx -h localhost mybestsellers < /home/users/jripper/bestsellerdump.sql

Tags:

Leave a Reply

© 2009 Freelancer Martin Zeller. All Rights Reserved.

This blog is powered by Wordpress and Magatheme by Bryan Helmig.