mysql报ERROR 2003错误的解决

在创建opensips数据库时,mysql报下列错误

[email protected]:/usr/local/opensips/sbin# ./opensipsdbctl create
MySQL password for root:
INFO: test server charset
ERROR 2003 (HY000): Can't connect to MySQL server on '192.168.0.18' (111)
ERROR 2003 (HY000): Can't connect to MySQL server on '192.168.0.18' (111)
WARNING: Failed to get the available and used character sets

 

解决方法

 

[email protected]# vim /etc/mysql/my.cnf


#bind-address           = 127.0.0.1
重新启动mysql

[email protected]# service mysql restart
mysql stop/waiting
mysql start/running, process 24719

再次执行

[email protected]:/usr/local/opensips/sbin# ./opensipsdbctl create
MySQL password for root:
INFO: test server charset
INFO: creating database opensips ...
INFO: Core OpenSIPS tables succesfully created.
Install presence related tables? (y/n): y 
INFO: creating presence tables into opensips ...
INFO: Presence tables succesfully created.
Install tables for imc cpl siptrace domainpolicy carrierroute userblacklist b2b registrant call_center? (y/n): y
INFO: creating extra tables into opensips ...
INFO: Extra tables succesfully created.

 

问题解决

你可能感兴趣的:(error,报错,2003)