Plinio Conti <[EMAIL PROTECTED]> wrote:
> I need to prepare some sql scripts which take parameters... how can I do?
>
> For example, suppose I want to have a sql script to create a new user granting to
> him some privileges and inserting its name in some application specific tables....
>
Seems stored procedure is that you are looking for:
http://dev.mysql.com/doc/mysql/en/Stored_Procedures.html
You can also put SQL commands to the text file. Then every time change username and
other values and execute commands:
shell> mysql -uuser_name -p databasename < file.sql
--
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.net http://www.ensita.net/
__ ___ ___ ____ __
/ |/ /_ __/ __/ __ \/ / Egor Egorov
/ /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED]
/_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.net
<___/ www.mysql.com
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]