Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Current »

Enable remote connection to asteriskcdrdb on freepbx

  • mysql

  • show databases;

  • use asteriskcdrdb;

  • SELECT User, Host, Password FROM mysql.user;  ( if new user already created)

  • CREATE USER 'someuser' IDENTIFIED BY 'somepassword';

  • GRANT USAGE ON *.* TO 'someuser'@'someipaddress' IDENTIFIED BY 'somepassword';

  • GRANT SELECT ON asteriskcdrdb.* TO 'someuser'@'someipaddress' identified by 'somepassword';

  • FLUSH PRIVILEGES;

  • SELECT User, Host, Password FROM mysql.user;  ( to show all MySQL/mariadb Users)
  • quit

Now verify that the remote user can connect to the Mariadb server/PBX run the following command:

  • mysql -u someuser -h pbx_ip -p

Enter password:

  • Allow access from  some IP address:

  • iptables -A INPUT -s someipaddress -p tcp --destination-port 3306 -j ACCEPT

  • iptables-save

Now download DBeaver Community universal database tool to connect to asteriskcdrdb ( or any other db tool i.e workbench) to connect to asteriskcdrdb as following:

https://dbeaver.io/download/

Reference: 

Remote CDR 

  • No labels