If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > Probs restoring

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 05-15-04, 16:09
Robse Robse is offline
Registered User
 
Join Date: Mar 2004
Posts: 35
Probs restoring

Hi I'm trying to restore a db from a .sql file (created with phpMyAdmin)
and this is the command I used:

mysql < usr_web10_2.sql

This gives me the following error:

ERROR 1046 at line 19: No Database Selected

This is the offending code:

DROP TABLE IF EXISTS `comments`;
CREATE TABLE `comments` (
`id` int(10) unsigned NOT NULL auto_increment,
`news_id` int(10) unsigned NOT NULL default '0',
`date` int(10) unsigned NOT NULL default '0',
`user` varchar(31) NOT NULL default '',
`email` varchar(63) NOT NULL default '',
`text` text NOT NULL,
PRIMARY KEY (`id`),
KEY `news_id` (`news_id`),
KEY `date` (`date`)
) TYPE=MyISAM AUTO_INCREMENT=97 ;

I tried putting a USE db_name; before but got the same error...

This is the version:

mysql Ver 12.22 Distrib 4.0.18, for Win95/Win98 (i32)
Current user: ODBC@localhost

What is wrong?

Last edited by Robse; 05-15-04 at 16:20.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On