> On Mon, Mar 10, 2008 at 11:07 AM,  <[EMAIL PROTECTED]> wrote:
>> I'm getting an error trying to run this command:
>>
>>  root>  mysql_tzinfo_to_sql /usr/share/zoneinfo/America/ | mysql -u xxx 
-p
>>  xxx
>>
>>  ERROR 1046 (3D000) at line 1: No database selected
>
>    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.
>
>-- 
> </Dan>
>
> Daniel P. Brown
> Senior Unix Geek
> <? while(1) { $me = $mind--; sleep(86400); } ?>

Thanks Daniel. 

The command worked with this syntax:

root> mysql_tzinfo_to_sql /usr/share/zoneinfo/America/ | mysql -D mysql -u 
xxx -p xxx

Still curious though why the databse needed to be explicitly selected now 
when I don't recall having to do that before. 

mysql_tzinfo_to_sql surely must know which db.tables to update... 

--David.

Reply via email to