Today's MySQL Suckage
Christopher Jones
c.jones at ucl.ac.uk
Fri Jan 23 10:36:36 GMT 2009
On 23 Jan 2009, at 10:04, Leo Lapworth wrote:
> 2009/1/23 Andy Wardley <abw at wardley.org>
>
>> I have a file which defines a MySQL database schema. It looks a bit
>> like this:
>>
>> /*
>> This table defines users of the
>> system who are Buffy fans.
>> */
>>
>> CREATE TABLE buffy_fans (
>> ..etc...
>> );
>>
>> I feed it in thusly:
>>
>> $ mysql < my_db_schema.sql
>
>
> Does:
>
> $ cat my_db_schema.sql | mysql
>
> Work any better?
Or from within MySQL, use the source command;
mysql> source 'my_db_schema.sql'
Chris.
More information about the london.pm
mailing list