First time here? Check out the FAQ!

Пожалуйста, войдите здесь. Часто задаваемые вопросы О нас
Задайте Ваш вопрос

Asterisk MySQL CDR - Not currently connected to a MySQL server.

0
asterisk-dk*CLI> cdr mysql status
Not currently connected to a MySQL server.

Настраивал по этому мануалу Отклонившись лишь тут

ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=latin1;

выбрал utf8.

Логин-пароль проверил войдя по ним через phpmyadmin и зайдя в нужную таблицу.

/etc/asterisk/cdr_mysql.conf

[global]
hostname
=localhost
dbname
=asterisk
table
=cdr
password
=***
user
=asterisk_user
sock
=/var/lib/mysql/mysql.sock

В чем мб дело?

=========== РЕШЕНИЕ ==============

В Ubuntu-12.04 сокет mysql находится здесь /var/run/mysqld/mysqld.sock

Исправил пусть до сокета в cdr_mysql.conf и всё завелось.

asterisk-dk*CLI> cdr mysql status
Connected to asterisk on socket file /var/run/mysqld/mysqld.sock using table cdr for 2 minutes, 43 seconds.
Wrote 12 records since last restart.

спросил Feb 20 '13

thunderamur Gravatar thunderamur
444 70 12 39

обновил Feb 21 '13

Comments

mysql -u asterisk_user -p*** asterisk

zzuz (Feb 20 '13)edit

пускает...

root@asterisk-dk:/etc/asterisk# mysql -u asterisk_user -p asterisk
Enter password:
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 130
Server version: 5.5.24-0ubuntu0.12.04.1 (Ubuntu)

Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates
. Other names may be trademarks of their respective
owners
.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql
>
thunderamur (Feb 21 '13)edit

1 Ответ

1

либо mysql не запущен, либо сокет неверный, либо пароль неправильный.

ссылка удалить спам редактировать

ответил Feb 20 '13

meral Gravatar meral flag of Ukraine
23347 24 20 177
http://pro-sip.net/

Comments

mysql запущен, пароль правильный, как проверить сокет?

[Feb 21 15:01:54] ERROR[8085]: cdr_mysql.c:202 mysql_log: Cannot connect to database server localhost: (2002) Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (13)
thunderamur (Feb 21 '13)edit
root@asterisk-dk:/etc/asterisk# ls /var/lib/mysql/
asterisk  debian
-5.5.flag  ib_logfile0  mysql               performance_schema  test
avantfax  ibdata1          ib_logfile1  mysql_upgrade_info  phpmyadmin

Нет файла, где взять?

thunderamur (Feb 21 '13)edit

В Ubuntu-12.04 сокет mysql находится здесь /var/run/mysqld/mysqld.sock

Исправил пусть до сокета в cdr_mysql.conf и всё завелось.

asterisk-dk*CLI> cdr mysql status
Connected to asterisk on socket file /var/run/mysqld/mysqld.sock using table cdr for 2 minutes, 43 seconds.
Wrote 12 records since last restart.
thunderamur (Feb 21 '13)edit

ну я ж сказал сокет неверный.это часто бывает. там галочка под правильным ответом.

meral (Feb 21 '13)edit

Ваш ответ

Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!
[скрыть предварительный просмотр]

Закладки и информация

Добавить закладку

подписаться на rss ленту новостей

Статистика

Задан: Feb 20 '13

Просмотрен: 2,879 раз

Обновлен: Feb 21 '13

Проект компании "АТС Дизайн"
Asterisk® и Digium® являются зарегистрированными торговыми марками компании Digium, Inc., США.
IP АТС Asterisk распространяется под лицензией GNU GPL.