[OpenSIPS-Users] Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock

Maysoon Aaziz Alduwais malduwais1 at KSU.EDU.SA
Mon Dec 5 13:09:56 CET 2011


Thank you vey much for responding,

Yes It is runing in local host.

Regards,
________________________________________
From: users-bounces at lists.opensips.org [users-bounces at lists.opensips.org] On Behalf Of Vlad Paiu [vladpaiu at opensips.org]
Sent: Monday, December 05, 2011 3:01 PM
To: users at lists.opensips.org
Subject: Re: [OpenSIPS-Users] Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock

Hello,

Your OpenSIPS does not start at all, because it can't connect to the
MySQL server.
Is the MySQL server running on localhost ?

Regards.

Vlad Paiu
OpenSIPS Developer


On 12/02/2011 10:43 PM, M.Abdulaziz wrote:
> Hello All,
>
> I was trying to configure opensips as a registerar but when uac clients
> sends the registration requests I got no reaction from opensips&  I got
> these error messages:
>
>
> Dec  2 22:29:16 [13681] DBG:db_mysql:db_mysql_connect: opening connection:
> mysql://xxxx:xxxx@localhost/opensips
> Dec  2 22:29:16 [13681] ERROR:db_mysql:db_mysql_connect: driver error(2002):
> Can't connect to local MySQL server through socket
> '/var/lib/mysql/mysql.sock' (2)
> Dec  2 22:29:16 [13681] ERROR:db_mysql:db_mysql_new_connection: initial
> connect failed
> Dec  2 22:29:16 [13681] ERROR:core:db_do_init: could not add connection to
> the pool
> Dec  2 22:29:16 [13681] ERROR:usrloc:register_udomain: failed to open
> database connection
> Dec  2 22:29:16 [13681] ERROR:registrar:domain_fixup: failed to register
> domain
> Dec  2 22:29:16 [13681] ERROR:core:fix_actions: fixing failed (code=-1) at
> cfg line 67
> Dec  2 22:29:16 [13681] ERROR:core:main: failed to fix configuration with
> err code -1
> Dec  2 22:29:16 [13681] DBG:core:shm_mem_destroy:
> Dec  2 22:29:16 [13681] DBG:core:shm_mem_destroy: destroying the shared
> memory lock
> Dec  2 22:29:16 [13679] DBG:core:wait_status_code: read code 111 ? rc = 0,
> errno=Success
> Dec  2 22:29:16 [13679] INFO:core:daemonize: pre-daemon process exiting with
> -1
>
>
> ********************************************* Here is my opensips.cfg file*
>
>
> # ----------- global configuration parameters ------------------------
>
> debug=6           # debug level (cmd line: -dddddddddd)
> fork=yes
> log_stderror=yes   # (cmd line: -E)
> children=8
>
>
>
> listen=udp:192.168.1.69:5060
> auto_aliases=no
>
> log_name="OPENSIPS-71"
> log_facility=LOG_LOCAL0
>
> # ------------------ module loading ----------------------------------
>
> #set module path
> mpath="/usr/local/lib64/opensips/modules/"
>
> # Uncomment this if you want to use SQL database
>
> loadmodule "db_mysql.so"
> loadmodule "sl.so"
> loadmodule "usrloc.so"
> loadmodule "registrar.so"
> loadmodule "textops.so"
> loadmodule "signaling.so"
> #loadmodule "mi_fifo"
>
> # ----------------- setting module-specific parameters ---------------
>
>
> # -- usrloc params --
>
>
> modparam("usrloc", "db_mode",   2)
> modparam("usrloc",
> "db_url","mysql://opensips:opensipsrw@localhost/opensips")
>
>
> # -------------------------  request routing logic -------------------
>
> # main routing logic
>
> route{
>
>       if(is_method("REGISTER"))
>       {
>               #set_time_stamp("before new ul save");
>               save("location");
>               #diff_time_stamp(1,"after ul save");
>               exit;
>       }
>
>       #set_time_stamp("before new ul lookup");
>       if(lookup("location"))
>       {
>               #diff_time_stamp(1,"after ul lookup");
>               sl_send_reply("200", "ok");
>       } else {
>               #diff_time_stamp(1,"after ul lookup");
>               sl_send_reply("404", "not found");
>       }
>
> }
>
>
>
> *could someone plz tell me where is mistake?*
>
> Thank you,
>
>
>
>
> --
> View this message in context: http://opensips-open-sip-server.1449251.n2.nabble.com/Can-t-connect-to-local-MySQL-server-through-socket-var-lib-mysql-mysql-sock-tp7056051p7056051.html
> Sent from the OpenSIPS - Users mailing list archive at Nabble.com.
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users

_______________________________________________
Users mailing list
Users at lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

Disclaimer:
This communication is intended for the above named person and is confidential and / or legally privileged. Any opinion(s) expressed in this communication are not necessarily those of KSU (King Saud University). If it has come to you in error you must take no action based upon it, nor must you print it, copy it, forward it, or show it to anyone. Please delete and destroy the e-mail and any attachments and inform the sender immediately. Thank you.
KSU is not responsible for the political, religious, racial or partisan opinion in any correspondence conducted by its domain users. Therefore, any such opinion expressed, whether explicitly or implicitly, in any said correspondence is not to be interpreted as that of KSU.
KSU may monitor all incoming and outgoing e-mails in line with KSU business practice. Although KSU has taken steps to ensure that e-mails and attachments are free from any virus, we advise that, in keeping with best business practice, the recipient must ensure they are actually virus free.



More information about the Users mailing list