Am Mi 20.12.2006 16:23 schrieb Manuel Arostegui Ramirez <manuel@todo-linux.com>:
As all of you could imagine to run the sql you must be root and know root password of the mysql server, so, I have no idea about how to ask for the root of the mysql when rpm -i foo.rpm is done.
Remembering that storing a password in cleartext is not a good way... But here is some example - which works only if you have control over the installation of mysql resp. your user has done the steps below manualy: First: restrict access to mysql in /etc/my.cnf (always a good idea ;-) if not done already. Afterwards store the (in our way ramdomly created) password in /root/.my.cnf. Now you can use the entries in /root/.my.cnf during installation of your package. But you should test, if everything works as expected _after_ your sql-insert statement is executed. (And overwriting an existing database is perhaps nothing you want, too...) Greetings, Lars --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org