List:General Discussion« Previous MessageNext Message »
From:brian Date:March 29 2011 12:46am
Subject:Re: phantom database
View as plain text  
On 11-03-28 06:38 PM, Dan Nelson wrote:
> In the last episode (Mar 28), brian said:
>> Ver 14.14 Distrib 5.1.49, for debian-linux-gnu (x86_64) using readline 6.1
>> Logged in as root, SHOW DATABASES displays a DB name that is inaccessible.
>> I haven't done anything with this DB for ~5 years.  I was recently asked
>> to do some work on the project and was actually surprised that I
>> (supposedly) still had it.  When I moved from fedora to ubuntu I did copy
>> over some DBs although I can't remember if I'd specifically copied this
>> one over.
>> When I noticed it was still there I tried to access it:
>> mysql mysql>  \u db_enzyme;
>> ERROR 1049 (42000): Unknown database 'db_enzyme;'
> I think you want "\u db_enzyme" here, without a semicolon.  \u isn't an SQL
> command so it isn't terminated by a semicolon.  That why the error message
> included it in the database name.  The long version of that comand (use)
> will strip a trailing semicolon automatically:
> mysql>  use test;
> Database changed
> mysql>  use test
> Database changed
> mysql>  \u test;
> ERROR 1049 (42000): Unknown database 'test;'
> mysql>  \u test
> Database changed
> mysql>
>  From the docs:
>         mysql sends each SQL statement that you issue to the server to be
>         executed.  There is also a set of commands that mysql itself
>         interprets.  For a list of these commands, type help or \h at the
>         mysql>  prompt:
>         Each command has both a long and short form. The long form is not
>         case sensitive; the short form is.  The long form can be followed by
>         an optional semicolon terminator, but the short form should not.

Oh, good frigging grief! I only use that command several times a day. 
For years now.

And that, boys & girls, is why posting the relevant passages from your 
terminal session will almost always be better than a description of your 
problem alone.

And, using the history facility is not always a good idea when trying to 
sort out a problem.

phantom databasebrian28 Mar
  • Re: phantom databaseDan Nelson29 Mar
    • Re: phantom databasebrian29 Mar