List:General Discussion« Previous MessageNext Message »
From:Paul DuBois Date:July 11 2001 9:38pm
Subject:Re: Using Scripts with MySQL - NEWBIE
View as plain text  
At 7:31 PM +0100 7/11/01, Sara wrote:
>Hi
>
>I am using Paul Dubois' book MySQL to teach myself.  He has sample 
>data base data which one can load using his scripts.
>
>However, the book doesn't say where the scripts have to be loaded to 
>inorder for them to work ie which directory?
>
>Also can someone just confirm the syntax for a create table script 
>(ie how to load it).
>
>The theory I understand, howerver I'm having some problems with 
>minor technicalities!
>
>Many thanks in anticipation
>
>Sara

Assuming you have unpacked the samp_db distribution into a directory
named samp_db, just cd into that directory, and then to execute a
file of SQL statements, use this command:

	mysql samp_db < filename

For example, to run the create_president.sql script:

	mysql samp_db < create_president.sql


-- 
Paul DuBois, paul@stripped
Thread
Using Scripts with MySQL - NEWBIESara11 Jul
  • Re: Using Scripts with MySQL - NEWBIEPaul DuBois11 Jul
  • Re: Using Scripts with MySQL - NEWBIESara13 Jul
    • Re: Using Scripts with MySQL - NEWBIEPaul DuBois13 Jul
  • Re: Using Scripts with MySQL - NEWBIESara13 Jul
    • Re: Using Scripts with MySQL - NEWBIEPaul DuBois13 Jul
Re: Using Scripts with MySQL - NEWBIEMike Baranski11 Jul