MySQL Lists are EOL. Please join:

List:General Discussion« Previous MessageNext Message »
From:Tim McDaniel Date:March 10 2008 3:36pm
Subject:Re: No database selected error when running mysql_tzinfo_to_sql
View as plain text  
On Mon, 10 Mar 2008, Daniel Brown <parasane@stripped> wrote:
>    mysql -D mysql -u xxx -p < mysql_tzinfo_to_sql /usr/share/zoneinfo/America/
>
>    The -D flag selects the database `mysql`, which is where the time
> zone information belongs.  The < redirect reads from the "file"
> (which, in this case, is actually a redirected STDOUT) into the
> database.

That is not legal shell syntax on UNIXy systems (or CMD.EXE, for that
matter).  "<" is followed by the input file name, so the command above
would read a file named "mysql_tzinfo_to_sql" in the current
directory.  It does not run the mysql_tzinfo_to_sql command.  The way
to redirect command output into the input of another command is to use
"|" in the proper way.  Please see the on-line man pages that I posted
in my other note a minute ago.

-- 
Tim McDaniel, tmcd@stripped
Thread
No database selected error when running mysql_tzinfo_to_sqldpgirago10 Mar
  • Re: No database selected error when running mysql_tzinfo_to_sqlDaniel Brown10 Mar
    • Re: No database selected error when running mysql_tzinfo_to_sqlTim McDaniel10 Mar
      • Re: No database selected error when running mysql_tzinfo_to_sqlDaniel Brown10 Mar
  • Re: No database selected error when running mysql_tzinfo_to_sqlTim McDaniel10 Mar
Re: No database selected error when running mysql_tzinfo_to_sqldpgirago10 Mar
  • Re: No database selected error when running mysql_tzinfo_to_sqlTim McDaniel10 Mar
Re: No database selected error when running mysql_tzinfo_to_sqldpgirago10 Mar