Re: mysqlimport puzzle

2001-02-20 Thread Atle Veka


sounds strange, but if you do it this way, you should have no problems:

mysqldump test_database  test_database.dump
mysql test_database  test_database.dump

will import everything in test_database.dump into your database..

somehow, you had selected your database, but that got dropped ?


Atle

On Tue, 20 Feb 2001, John Jensen wrote:

 
 Yesterday, I was having fun writing mysql scripts and importing them. 
 I would do a drop database and re-import, editing the data in the 
 script.
 
 Today, I couldn't for the life of me do an import on a mysql export 
 file, even using commands stored from yesterday, in bash_history.
 I am getting errors like:
 
 ERROR 1046 at line 10: No Database Selected.
 
 Line 10 just says "CREATE TABLE Test (" with only comment preceeding, 
 until I realized that mysqldump was not putting:
 
 CREATE DATABASE Test;
 USE Test;
 
 at the beginning, so mysqlimport was useless where the database did 
 not yet exist. Do I have to manually add those lines to transfer a 
 dump file to a new machine?
 
 
 John Jensen
 520 Goshawk Court
 Bakersfield, CA 93309
 661-833-2858
 
 -
 Before posting, please check:
http://www.mysql.com/manual.php   (the manual)
http://lists.mysql.com/   (the list archive)
 
 To request this thread, e-mail [EMAIL PROTECTED]
 To unsubscribe, e-mail [EMAIL PROTECTED]
 Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
 


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




mysqlimport puzzle

2001-02-20 Thread John Jensen


Yesterday, I was having fun writing mysql scripts and importing them. 
I would do a drop database and re-import, editing the data in the 
script.

Today, I couldn't for the life of me do an import on a mysql export 
file, even using commands stored from yesterday, in bash_history.
I am getting errors like:

ERROR 1046 at line 10: No Database Selected.

Line 10 just says "CREATE TABLE Test (" with only comment preceeding, 
until I realized that mysqldump was not putting:

CREATE DATABASE Test;
USE Test;

at the beginning, so mysqlimport was useless where the database did 
not yet exist. Do I have to manually add those lines to transfer a 
dump file to a new machine?


John Jensen
520 Goshawk Court
Bakersfield, CA 93309
661-833-2858

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php