# RealTime Connection Failed (PLZ!)

**URL:** <https://community.asterisk.org/t/realtime-connection-failed-plz/9083>\
**Category:** Asterisk Support\
**Created:** [September 10, 2006, 2:24am UTC](https://community.asterisk.org/t/realtime-connection-failed-plz/9083 "2006-09-10T02:24:39Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![anotehrbyoung](https://avatars.discourse-cdn.com/v4/letter/a/919ad9/32.png) [@anotehrbyoung](https://community.asterisk.org/u/anotehrbyoung)\
**Post date:** [September 10, 2006, 2:24am UTC](https://community.asterisk.org/t/realtime-connection-failed-plz/9083/1 "2006-09-10T02:24:39Z")

</div>

I have been trying to learn Linux (Debian) and Asterisk over the past few weeks. I am trying to setup asterisk to use Realtime for my extensions. I have followed the popular tutorials.  
When i load asterisk

# asterisk -rvvvvv

I get a nice "Binding extensions to mysql/asterisk/extensions\_table"  
and it makes me think i am doing something right

but when i place a call i get several:  
Sep 9 18:42:44 ERROR[15737]: res\_config\_mysql.c:651 mysql\_reconnect: MySQL Real Time: Failed to connect database server asterisk on (err 2002). Check debug for more info.

i have checked the error logs and found;  
Sep 9 18:38:33 WARNING[15678] res\_config\_mysql.c: MySQL RealTime: No database user found, using ‘asterisk’ as default.  
Sep 9 18:38:33 WARNING[15678] res\_config\_mysql.c: MySQL RealTime: No database password found, using ‘asterisk’ as default.  
Sep 9 18:38:33 WARNING[15678] res\_config\_mysql.c: MySQL RealTime: No database host found, using localhost via socket.  
Sep 9 18:38:33 WARNING[15678] res\_config\_mysql.c: MySQL RealTime: No database name found, using ‘asterisk’ as default.  
Sep 9 18:38:33 WARNING[15678] res\_config\_mysql.c: MySQL RealTime: No database port found, using 3306 as default.  
Sep 9 18:38:33 WARNING[15678] res\_config\_mysql.c: MySQL RealTime: No database socket found, using ‘/tmp/mysql.sock’ as default.

but i have the right info in my res\_mysql.conf  
[general]  
dbhost = 127.0.0.1 (i have also tried localhost)  
dbname = asterisk  
dbuser = root (using root to rule our other issues)  
dbpass = ####  
dbport = 3306  
dbsock = /var/run/mysqld/mysqld.sock (this is the location mysql is set to store the \*.sock file)

Does any one have any ideas why the error log says stuff like No databse user found. it is set in my res\_mysql.conf file???

One thing i thought was odd… when i search for (find / -name) mysql.sock it can’t locate it.  
same thing with the res\_config\_mysql.c that the error log mentions

I hope there is some one who can help, thanks!

---

<div class="post-metadata">

**Author:** ![rrashid](https://avatars.discourse-cdn.com/v4/letter/r/45deac/32.png) [@rrashid](https://community.asterisk.org/u/rrashid)\
**Post date:** [September 11, 2006, 4:56am UTC](https://community.asterisk.org/t/realtime-connection-failed-plz/9083/2 "2006-09-11T04:56:52Z")

</div>

You have it commented out. You have to remove the ; before the lines so you end up with:

[general]  
dbhost = 127.0.0.1 (i have also tried localhost)  
dbname = asterisk  
dbuser = root (using root to rule our other issues)  
dbpass = ####  
dbport = 3306  
dbsock = /var/run/mysqld/mysqld.sock (this is the location mysql is set to store the \*.sock file)

---

<div class="post-metadata">

**Author:** ![rrashid](https://avatars.discourse-cdn.com/v4/letter/r/45deac/32.png) [@rrashid](https://community.asterisk.org/u/rrashid)\
**Post date:** [September 11, 2006, 4:58am UTC](https://community.asterisk.org/t/realtime-connection-failed-plz/9083/3 "2006-09-11T04:58:22Z")

</div>

Also for the future the semi colin (😉 is used to comment things out. So say for instance you wanted to put in notes. You can put this in in the begining of the line and and then write all the text that you want. Asterisk will ignore a line that starts with a semi colin.

;This text will be ignored by asterisk  
This text wont becuase it has no semi colin.

---

<div class="post-metadata">

**Author:** ![anotehrbyoung](https://avatars.discourse-cdn.com/v4/letter/a/919ad9/32.png) [@anotehrbyoung](https://community.asterisk.org/u/anotehrbyoung)\
**Post date:** [September 12, 2006, 1:07am UTC](https://community.asterisk.org/t/realtime-connection-failed-plz/9083/4 "2006-09-12T01:07:37Z")

</div>

i wish that was the problem… thanks though LOL… i commented everything out shortly before i copied and pasted that for the forum. i was trying to setup my mysql DB and credentials to match what asterisk was defaulting to. i have sense started over with a clean install of debian… we’ll see how it goes this time around
