Trouble executing script from command line

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Fork

    #1

    Trouble executing script from command line

    Hi,

    I am trying to execute a script from the command line as follows;

    c:\program files\mysql\bin >mysql -u root newsman < servers3.mysql

    But this gives me the following error;

    ERROR 1064 at line 3: You have an error in your SQL syntax. Check the
    manual that corresponds to your MySQL server version for the right syntax
    to use near '' at line 1

    The script I am trying to use is as follows;

    update servers;
    set MaxConnections = 3 where ServerName = 'EasyNews';

    update servers;
    set MaxConnections = 3 where ServerName = 'UsenetServer';

    update settings;
    set SettingValue = 'Yes' where SettingName = 'UseProxy';

    "Servers" is a valid field name, and "MaxCommections ", "ServerName ",
    "SettingVal ue" and "SettingNam e" are all valid fieldnames.

    What am I doing wrong?

    Thanks for any help,

    Fork.
  • Aggro

    #2
    Re: Trouble executing script from command line

    Fork wrote:
    [color=blue]
    > update servers;
    > set MaxConnections = 3 where ServerName = 'EasyNews';[/color]

    # That should be

    update servers
    set MaxConnections = 3 where ServerName = 'EasyNews';

    Comment

    • Fork

      #3
      Re: Trouble executing script from command line

      On Mon, 14 Jun 2004 19:29:27 GMT, Aggro wrote:[color=blue]
      >
      > # That should be
      >
      > update servers
      > set MaxConnections = 3 where ServerName = 'EasyNews';[/color]

      Yep, that's done it - thanks.

      Fork.

      Comment

      Working...