Follow-up Comment #2, bug #2718 (project savane):
I used my script to update my test install and Savannah - so I tested it :)
If you test your script however, you'll see that system returns 0 (the
process exit code, not a boolean), which will trigger the die() part ;)
Another way is to use "and die()", but that's not very clear, hence the
C-style "if (sthing != 0) die"
Suppressing -u and -p in the mysql call falls back to the username and/or
info in ~/.my.cnf. Using only -p forces requesting password, even if it is in
~/.my.cnf. Usually the script is ran by somebody used to accessing the
database manually, hence it's likely (s)he uses a .my.cnf file. In my case
user root was used, ie the one with the privs to drop and delete the database
(and create new tables).
Btw, something I just realize is that using -p $PASS is insecure because the
pass will show up in the process list (ps aux...).
_______________________________________________________
Reply to this item at:
<http://gna.org/bugs/?func=detailitem&item_id=2718>
_______________________________________________
Message posté via/par Gna!
http://gna.org/
_______________________________________________
Savane-dev mailing list
[email protected]
https://mail.gna.org/listinfo/savane-dev