If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > Newbie to MySql question : how to execute multicommand sql script ?

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 08-22-06, 12:08
lurulu lurulu is offline
Registered User
 
Join Date: Aug 2006
Posts: 1
Newbie to MySql question : how to execute multicommand sql script ?

Hi,
I 'm using winsql 5.0 + mysql-connector-odbc-3.51.12 + mySql 5.0.21 and I want to initialize a database with a script containing lots of
create table statements and insert statements. Seems I can only execute one statement at a time. How can I execute the whole script ??
Tx, L.
Reply With Quote
  #2 (permalink)  
Old 08-30-06, 04:33
HSN HSN is offline
Registered User
 
Join Date: May 2006
Posts: 24
copy & paste it in the mysql console!
Reply With Quote
  #3 (permalink)  
Old 09-14-06, 00:20
pakcik_kantin pakcik_kantin is offline
Registered User
 
Join Date: Jul 2004
Posts: 62
Quote:
mysql/bin > mysql -uroot -p database_name < sample_script.sql
sample_script.sql
Quote:
create table.....;
insert ....;
create table.....;
insert ....;
create table.....;
insert ....;
create table.....;
insert ....;
Reply With Quote
  #4 (permalink)  
Old 09-18-06, 00:40
pakcik_kantin pakcik_kantin is offline
Registered User
 
Join Date: Jul 2004
Posts: 62
Talking

Greetings,
the multiline command depends on the tools, but most free tools that i use, like
MySql console,HeidiSQL,MySQL Front, Navicat did accept multiline script in the query browser...
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On