Remote connection to the Ejabberd Mnesia database

Source: Internet
Author: User
Tags node server

Because the server is a version of servers, it is difficult to visually see Mnesia data. So it's very confusing for beginners.

Specifically in the QQ group to consult others. Others say that as long as the pong through the line, you can use RPC to operate the remote Mnesia database. Beginners too understand this meaning. Then specifically search for a bit, and finally found someone else about the two Erl node Server ping Pass article.

OK, then connect the Ejabber Mnesia database remotely.

Ejabberd default node is [email protected], this node is not normal ping pass. I also try to modify the Ejabberdctl.cfg configuration file, hosts and other files to modify the Ejabberd node. Although successful, Ejabberd can start, but the Stop command is not valid. I didn't delve into the question. Want to connect directly to Ejabberd's Mnesia. Regardless of the Ejabberd node problem.

So...

Start Erlang, and specify the directory for the Mnesia database.

I operate on the virtual machine as follows:

    • $ Erl-name ' [email protected] '-mnesia dir ' "/var/lib/ejabberd" ' (IP for native IP, must, otherwise not ping pass)
    • ([email protected]) >
    • ([email protected]) > Auth:get_cookie (). (Get Cookie)
    • ([email protected]) > ' Absdvfhtfsh '

Copy the cookie and then operate on this computer:

    • $ Erl-name ' [email protected] '-setcookie ' absdvfhtfsh '
    • ([email protected]) >
    • ([email protected]) >net_adm:ping (' [email protected] ').
    • ([email protected]) >pong

Pong said, Pang said there was no pass

Then you can operate the Mnesia remotely. For example: Observer:start ().

Remote connection to the Ejabberd Mnesia database

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.