469,271 Members | 1,785 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,271 developers. It's quick & easy.

importing a complete database

Hi,

I have a MySQL .sql file that contains not only a single table but several,
its a dump from a complete database.

How can I import that back into a MySQL Server? MySQLImport seems not to be
able to handle complete databases, each table has to have it's own
textfile... or am I wrong there?

if yes, what would be the typical command?
thanks

Oliver

Jul 19 '05 #1
6 1616
Oliver Spiesshofer wrote:
Hi,

I have a MySQL .sql file that contains not only a single table but several,
its a dump from a complete database.

How can I import that back into a MySQL Server? MySQLImport seems not to be
able to handle complete databases, each table has to have it's own
textfile... or am I wrong there?

if yes, what would be the typical command?


If you have created database already then for example:
mysql -u root -p databasename < yoursqlfile.sql
Jul 19 '05 #2
Oliver Spiesshofer wrote:
Hi,

I have a MySQL .sql file that contains not only a single table but several,
its a dump from a complete database.

How can I import that back into a MySQL Server? MySQLImport seems not to be
able to handle complete databases, each table has to have it's own
textfile... or am I wrong there?

if yes, what would be the typical command?


If you have created database already then for example:
mysql -u root -p databasename < yoursqlfile.sql
Jul 19 '05 #3
Oliver Spiesshofer wrote:
Hi,

I have a MySQL .sql file that contains not only a single table but several,
its a dump from a complete database.

How can I import that back into a MySQL Server? MySQLImport seems not to be
able to handle complete databases, each table has to have it's own
textfile... or am I wrong there?

if yes, what would be the typical command?


If you have created database already then for example:
mysql -u root -p databasename < yoursqlfile.sql
Jul 19 '05 #4
On Mon, 09 Feb 2004 13:07:54 GMT, Oliver Spiesshofer
<ol****@email.com> wrote:
Hi,

I have a MySQL .sql file that contains not only a single table but several,
its a dump from a complete database.

How can I import that back into a MySQL Server? MySQLImport seems not to be
able to handle complete databases, each table has to have it's own
textfile... or am I wrong there?


MySqlImport is intended for data-dump files (containing delimited
data), not sql script files.

To make the Mysql client run a sql script, from inside the client, do

mysql> source myscript.sql;

Chuck Gadd
http://www.csd.net/~cgadd/aqua
Jul 19 '05 #5
On Mon, 09 Feb 2004 13:07:54 GMT, Oliver Spiesshofer
<ol****@email.com> wrote:
Hi,

I have a MySQL .sql file that contains not only a single table but several,
its a dump from a complete database.

How can I import that back into a MySQL Server? MySQLImport seems not to be
able to handle complete databases, each table has to have it's own
textfile... or am I wrong there?


MySqlImport is intended for data-dump files (containing delimited
data), not sql script files.

To make the Mysql client run a sql script, from inside the client, do

mysql> source myscript.sql;

Chuck Gadd
http://www.csd.net/~cgadd/aqua
Jul 19 '05 #6
On Mon, 09 Feb 2004 13:07:54 GMT, Oliver Spiesshofer
<ol****@email.com> wrote:
Hi,

I have a MySQL .sql file that contains not only a single table but several,
its a dump from a complete database.

How can I import that back into a MySQL Server? MySQLImport seems not to be
able to handle complete databases, each table has to have it's own
textfile... or am I wrong there?


MySqlImport is intended for data-dump files (containing delimited
data), not sql script files.

To make the Mysql client run a sql script, from inside the client, do

mysql> source myscript.sql;

Chuck Gadd
http://www.csd.net/~cgadd/aqua
Jul 19 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Alexander Pope | last post: by
2 posts views Thread by TheElectron707 | last post: by
5 posts views Thread by dixie | last post: by
1 post views Thread by madeleine.macphail | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.