Skip to content
Command Line Interface

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 root via SSH using your favorite console (e.g. Putty).

  • STEP 2: Execute the following command.

bash
cat /etc/voipnow/.sqldb

The 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> voipnow

Note 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}'` voipnow
  • STEP 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.

Last updated: Dec 11, 2025