On Mon, Mar 10, 2008 at 11:36 AM, Tim McDaniel <[EMAIL PROTECTED]> wrote:
> On Mon, 10 Mar 2008, Daniel Brown <[EMAIL PROTECTED]> 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.

    You're right.  I can't find the pipe character on my Treo 700wx's
keyboard, so I meant to show an alternative method (directing it to a
file and directing the file into MySQL), but must've screwed up and
lost train of thought halfway through.  Odd.

    It should've been as follows:

        mysql_tzinfo_to_sql /usr/share/zoneinfo/America/ >
/tmp/time_zone_info.sql
        mysql -D mysql -u xxx -p < /tmp/time_zone_info.sql

-- 
</Dan>

Daniel P. Brown
Senior Unix Geek
<? while(1) { $me = $mind--; sleep(86400); } ?>

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to