* Enrique Andreu
> Hello, I think I have explained bad. I want to pass
> the arguments to the sql script.
> The argument is for the sql script.
>
> For example:
> myscript.sql should be:
> GRANT ALL PRIVILEGES ON *.* TO &1@'%'
> where &1 would be parameter 1
>
> I want to do something like that:
> dos>mysql mysql -u root -p < myscript.sql argument

You should probably also give the users passwords...

Try this:

C:>copy con adduser.cmd
@mysql -u root -p -e "GRANT ALL PRIVILEGES ON *.* TO '%1'@'%%'"
^Z
C:>adduser username

Note the double %% for host. "^Z" means press Ctrl+Z, it's the end-of-file
marker. The leading '@' is to make it silent. Remove this or add the -v
option to mysql to see the command beeing executed.

--
Roger


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to