[erlang-questions] Mnesia and IP addresses problem

Robert Raschke rtrlists@REDACTED
Fri May 7 14:39:26 CEST 2010


On Fri, May 7, 2010 at 1:25 PM, zabrane Mikael <zabrane3@REDACTED> wrote:

> Hi,
>
> I'm facing a little issue whith my Mnesia DB.
> On one machine with IP addresse "ip1", i've created a persistent mnesia DB
> after
> running erlang in distributed mode "erl -name mynode1@REDACTED".
>
> When I copied that DB on another machine whith a different IP address (erl
> -node mynode@REDACTED),
> I was unable to read it.
>
> As you may notice, I've used the same node name "mynode" on both machines.
> Only IP
> are diffrent.
>
> What am I doing wrong?
>
> Regards
> Zabrane
>

Mnesia schemas are node specific. When you are migrating between machines
(and you using long names or something else than @localhost) or change the
node name you have to convert the schema to follow. See
http://www.erlang.org/doc/apps/mnesia/Mnesia_chap7.html#id2277864 for more
information on how to do that.

Obviously, you only need to do that if you have data that needs to get
migrated. If you don't care about the data, just remove all the mnesia files
and rebuild the schema from scratch.

Robby


More information about the erlang-questions mailing list