How to execute a script in MySQL?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • zalekbloom@hotmail.com

    How to execute a script in MySQL?

    I am renting space on 2 servers. On one server I created a script with
    sql's "create table .., insert into...". Now I want to execute this
    script on the second server. What is a syntax?
    I tried from telnet:
    dbname < file.sql
    where dbname is a name of my db and file.sql is a script, but I got
    message "syntax error".
    Any idea why?

    Thanks,

    Zalek
  • Siemel Naran

    #2
    Re: How to execute a script in MySQL?

    <zalekbloom@hot mail.com> wrote in message
    [color=blue]
    > I am renting space on 2 servers. On one server I created a script with
    > sql's "create table .., insert into...". Now I want to execute this
    > script on the second server. What is a syntax?
    > I tried from telnet:
    > dbname < file.sql
    > where dbname is a name of my db and file.sql is a script, but I got
    > message "syntax error".
    > Any idea why?[/color]

    Check out the 'source' command.


    Comment

    • Siemel Naran

      #3
      Re: How to execute a script in MySQL?

      <zalekbloom@hot mail.com> wrote in message
      [color=blue]
      > I am renting space on 2 servers. On one server I created a script with
      > sql's "create table .., insert into...". Now I want to execute this
      > script on the second server. What is a syntax?
      > I tried from telnet:
      > dbname < file.sql
      > where dbname is a name of my db and file.sql is a script, but I got
      > message "syntax error".
      > Any idea why?[/color]

      Check out the 'source' command.


      Comment

      Working...