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?