Home
 

Customer Support

Search for keywords:

Browse by category:

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

User-Contributed Notes

add a note
user -at- example.com
13-Feb-2004 09:13
More notes at http://www.mysql.com/doc/en/Upgrading-to-arch.html

18-Apr-2009 00:55
you can also get to the mysql shell and then type "source file.sql",
where file.sql is your dump file

add a note

Related Questions:


How do I import delimited data into MySQL?

How do I change my MySQL password?

How do I connect to my MySQL database?

How can I export data in CSV or tab delimited format?

Why do i get a query syntax error 1064 from MySQL when the syntax seems correct?

How do I export and move my database tables between servers or copy databases?

I can't connect to local MySQL server through socket 'mysql.sock'

How do I create a .my.cnf MySQL preference file?

How do I change MySQL timezone?

What is my database server name?

What is my MySQL Username or Database Name?

MySQL says I have too many connections.

How do I check how much disk space my database is using?

A MySQL MYI table has errors in it.

Can I connect to MySQL remotely?

Can I connect to my MySQL database from my own computer?

I can't get phpMyAdmin to work.

phpMyAdmin gives SQL syntax error when I try to create table.

How can I use odbc_connect() in my PHP scripts to connect to MySQL?

What kind of database server do you offer?

How many databases do I get?

How do I import a MySQL dumpfile into my database via phpMyAdmin?

What am I allowed to do with my MySQL database?

Will we be able to do our own MySQL admin?

Do you offer MySQL 5?

How do I export a MySQL dumpfile via phpMyAdmin?

How do I create a MYSQL dumpfile?

Browse Categories:

Getting Started, FTP, Telnet/SSH, Moving Domains, E-mail, Traffic Reports, Mailing Lists, Apache, PHP, CGI, Other Server-Side Scripting, MySQL Database, Imaging Libraries, Other Software, Billing & Terms, Control Panel, E-commerce, Pre-Sales


Modwest PHP Hosting      Copyright 2000-2009 by Modwest, Inc.      About    |    Blog    |    Community    |    Design    |    Jobs    |    Contact