Asterisk not connecting to realtime database

Hi, I have configured a realtime database named ‘asterisk’ in mysql on my ubuntu server and I am running asterisk on the same server but everytime it shows me the same error : “Invalid Database specified ‘asterisk’”. I made some changes such as in the res_config_mysql file I changed [general] to [asterisk]. Now I am getting a different error which is " Failed to connect to database server asterisk on ".

my database has only 1 table as of now which is ps_endpoints( id, transport, aors, auth, context, disallow, allow, direct_media)


ps_endpoints => mysql,asterisk,ps_endpoints

dbhost =
dbname = asterisk
dbuser = root
dbpass = walkover
dbport = 3306



Hi Tanya,

That table seems quite light on columns (would have expected many more). Did you create this table manually or use alembic?

Can you access that db from the command line using those creds while logged in with your run user asterisk (or which ever user runs asterisk)? mysql logs might show something a bit more descriptive too.


I have created the table manually.
And my mysql logs is showing " Acces denied for root@localhost"

Hey Tanya, not sure how your database has been setup but it sounds like a mysql issue rather than Asterisk directly. Search mysql root@localhost and it will explain that this default behaviour won’t work without some changes - using the root user this way is generally considered bad practice.

I think you will be hitting issues with that manually created tabled even if you managed to login, it would be better to follow the guide and not use root but a new user such as asterisk:

Hi thank you so much, my problem got resolved after I created a new user and gave it all the priviliges on my database. But it seems a bit confusing to me as a root user already has all priviliges over the database so how does making a new user and giving him priviliges which the root user already have could make any difference

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.