How do I import a MySQL dumpfile into my database?
After you have dumped out your data into a file as described here, FTP or scp that dump file to the home directory (/) on our system.
Once you have uploaded the dump file to your account here, get a shell prompt on our system using telnet or ssh.
Now import the dump file into MySQL by typing all the following on 1 single line at the shell prompt:
mysql -p -h DBSERVER dbname < dbname.sql
The above assumes that your database name on our system is "dbname" and the dumpfile that you uploaded was named "dbname.sql". Replace those with your correct database name and dumpfile filename. Also replace DBSERVER with your correct database server name.
If you have followed this other FAQ on how to create a .my.cnf preference file, you would not have to type so much when connecting to the MySQL Monitor from the shell prompt. With a proper .my.cnf file you could have imported the dump by just typing this at the shell prompt:
mysql < dbname.sql
After you have dumped out your data into a file as described here, FTP or scp that dump file to the home directory (/) on our system.
Once you have uploaded the dump file to your account here, get a shell prompt on our system using telnet or ssh.
Now import the dump file into MySQL by typing all the following on 1 single line at the shell prompt:
mysql -p -h DBSERVER dbname < dbname.sql
The above assumes that your database name on our system is "dbname" and the dumpfile that you uploaded was named "dbname.sql". Replace those with your correct database name and dumpfile filename. Also replace DBSERVER with your correct database server name.
If you have followed this other FAQ on how to create a .my.cnf preference file, you would not have to type so much when connecting to the MySQL Monitor from the shell prompt. With a proper .my.cnf file you could have imported the dump by just typing this at the shell prompt:
mysql < dbname.sql
0 Comments:
Post a Comment
<< Home