Mailinglist Archive: opensuse-buildservice (131 mails)
| < Previous | Next > |
Re: [opensuse-buildservice] storing mysql root password
- From: Lars Rupp <lrupp@xxxxxxx>
- Date: Thu, 21 Dec 2006 11:00:59 +0100 (CET)
- Message-id: <511222.1166695259951.SLOX.WebMail.wwwrun@xxxxxxxxxxxxxxxx>
Am Mi 20.12.2006 16:23 schrieb Manuel Arostegui Ramirez
<manuel@xxxxxxxxxxxxxx>:
> 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@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-buildservice+help@xxxxxxxxxxxx
<manuel@xxxxxxxxxxxxxx>:
> 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@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-buildservice+help@xxxxxxxxxxxx
| < Previous | Next > |