Results 1 to 1 of 1

Thread: Probs restoring

  1. #1
    Join Date
    Mar 2004

    Unanswered: 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`)

    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 17:20.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts