How to import a mysql dump into mysql using the commmand line | mysql | technical guides | Support | Clear Intent- How to import a mysql dump into mysql using a single commmand line

 

How to import a mysql dump into mysql using the commmand line | mysql | technical guides | Support | Clear Intent

How to import a MySQL dumpfile into a database using a single command?

Ftp your dump file to a known location on your server, in this example /home/user/dumpfile.sql

Get a shell prompt using SSH. You can use putty or a similar client for this.

Now import the dump file into MySQL using the following command entered on a single line at the shell prompt.

mysql -p -h -u dbuser dbserver dbname < /home/user/dumpfile.sql

You will be prompted for the password. Enter the password for the dbuser value you entered, as long as your dbuser has the appropriate permissions the dumpfile will be imported.

dbuser is the database user.
dbname is the database name.
dbserver is the database host name. e.g. localhost.

 

.

© 2008 Clear Intent All Rights Reserved
powered by clear cms