storing root password rpm spec file

Mogens Kjaer mk at crc.dk
Thu Dec 21 08:46:56 UTC 2006


Manuel Arostegui wrote:
> Hi all.
> I´m packing an application which has got some .sql to configure database.
> When you download the tar.gz you have to run the sql by hand, of course, and all tables, and
> databases are created.
> Well, I would like to make that process automatically when the rpm is being installed.

A (very) dirty trick is to let the installation script
stop the mysqld daemon, start it again with --skip-grant-tables,
load your databases (no password is then required), and
restart the daemon normally.

Mogens

-- 
Mogens Kjaer, Carlsberg A/S, Computer Department
Gamle Carlsberg Vej 10, DK-2500 Valby, Denmark
Phone: +45 33 27 53 25, Fax: +45 33 27 47 08
Email: mk at crc.dk Homepage: http://www.crc.dk




More information about the fedora-list mailing list