Last updated on July 31st, 2016 at 11:11 am
In this post i am going to explain how we can set or default database in Ejabberd. If you want to learn how to setup Ejabberd on your ec2 instance please read my last post. Please follow simple steps to setup things.
Step 1. I think you already setup your ec2 Instance and also configure PHP and PHPMyAdmin on your server.
Step 2. Login to your instance from putty. Once you login type
sudo su
We need to login as super user to make change in file and to install any application if we need.
Step 3. After login as super user you need to open Ejabberd config file to edit its setting by entering following command
nano /etc/ejabberd/ejabberd.cfg
Step 4. After step 3 editor open config find look for MySQL Server and add your MySQL server details like database username password and press ctrl+w to save change and ctrl+x to exit editor.
Step 5. After making change restart your server using this command
service ejabberd restart
Step 6. Now login to your PHPMyAdmin where you create a database for your ejabberd and open your sql box from top menu. Now go to this link and copy all mysql queries and paste in your sql box and run.
Note: You need MySQL version 5.6 or above to run these queries.
If you want to update to MySQL database follow these link. Keep you database backup before upgrading.
Official Site link: https://docs.ejabberd.im/admin/guide/databases/mysql/.
Hope this will help you.