mnesia db dir

Ulf Wiger (AL/EAB) ulf.wiger@REDACTED
Sun Jul 10 17:49:53 CEST 2005


Róbert Balogh

> The first question is it possible to set the path of the 
> mnesia db from "code". I mean is there other way than erl 
> -sname nodename -mnesia dir '"dirpath"'?

Sorry, I was a little trigger-happy.

Using mnesia:start(ExtraEnv) should do the trick, e.g.

mnesia:start([{dir, "..."}]).

This effectively does the same thing as calling 
application:set_env/3 after loading, but before starting
mnesia, but is obviously much more convenient.

Regards,
Uffe



More information about the erlang-questions mailing list