Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How Elixir can read remote node mnesia table

Tags:

elixir

mnesia

I am trying use Elixir to write program to access mnesia. I run iex shell in amazon linux. I tried to connect another node using

Node.connect(:'[email protected]')

which return true, then I want to run mnesia command on this remote node, I issue

  :mneisa.info

However, it only returns local node mnesia info. How can I access the connected remote node's mnesia database?

I have tried rpc_call, it works. But is it having more direct method to get the data from remote node mnesia.

like image 620
want_to_be_calm Avatar asked Apr 15 '15 05:04

want_to_be_calm


1 Answers

Did you try:

Node.spawn :'[email protected]', fn -> :mneisa.info end 
like image 144
GavinBrelstaff Avatar answered Oct 18 '22 05:10

GavinBrelstaff