How to connect to the VoipNow database ​
WARNING
Applies to VoipNow 3 and higher!
To execute queries on the MySQL database, you must access the command line MySQL client.
Step-by-step guide ​
STEP 1: Log in to your VoipNow server as
rootvia SSH using your favorite console (e.g.ÂPutty).STEP 2: Execute the following command.
bash
cat /etc/voipnow/.sqldbThe output will provide a single line like the one below.
bash
main:<DB_USER>:<DB_PASS>- STEP 3: Run the next command.
bash
mysql -u<DB_USER> -p<DB_PASSWD> voipnowNote that you may equally run this command:
bash
mysql -u`cat /etc/voipnow/.sqldb| awk -F':' '{print $2}'` -p`cat /etc/voipnow/.sqldb| awk -F':' '{print $3}'` -h `cat /etc/voipnow/sqldbase.conf | grep DB_MASTER | awk -F':' '{print $2}'` voipnowSTEP 4: Use the values obtained for the <DB_USER> and \DB_PASSWD> parameters.
STEP 5: Now you will be connected to your MySQL server and you will be able to run queries in the database.