<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
Hi,<br>
server1(<b>opensips</b>_<font color="#cc0000">localip</font>)
------> server2(<b>mysql</b>_<font color="#cc0000">remoteip</font>)
<br>
my opensips's script works(can connect to mysql server, and
register is ok)
<br>
such as:<br>
modparam("usrloc",
"db_url","mysql://opensips:opensipsrw@remoteip/opensips")<br>
<br>
if I use following operation,<b><u>mysql connections works</u></b>(that
means mysql Server configurations is correct)
<br>
#mysql -uroot -hremote_ip -p
<br>
Enter password: <br>
Welcome to the MySQL monitor. Commands end with ; or \g.
<br>
Your MySQL connection id is 11831
<br>
Server version: 5.0.77 Source distribution
<br>
<br>
Copyright (c) 2000, 2012, Oracle and/or its affiliates.
All rights reserved.
<br>
<br>
Oracle is a registered trademark of Oracle Corporation
and/or its
<br>
affiliates. Other names may be trademarks of their
respective
owners.
<br>
<br>
Type 'help;' or '\h' for help. Type '\c' to clear the
current input statement.
<br>
mysql> <br>
<br>
<br>
//////////////////////////////////////////////////////////////////////////////
<br>
but when i do following instruction<br>
# opensipsctl ul show
<br>
<b> /etc/opensips/opensipsctlrc: 23: DBHOST: not found
</b><b><br>
</b><b> //etc/opensips//opensipsctlrc: 23: DBHOST: not found
</b><b><br>
</b><b> /etc/opensips/opensipsctlrc: line 23: DBHOST: command
not found
</b><b><br>
</b><b> //etc/opensips//opensipsctlrc: line 23: DBHOST:
command not found
</b><b><br>
</b><b> Cannot load core functions '/sbin/opensipsctl.base' -
exiting ..</b>.
<br>
<br>
<br>
# ./opensipsdbctl create
<br>
/etc/opensips/opensipsctlrc: 23: DBHOST: not found
<br>
/usr/local/etc/opensips/opensipsctlrc: 23: DBHOST: not found
<br>
/etc/opensips/opensipsctlrc: line 23: DBHOST: command not
found
<br>
/usr/local/etc/opensips/opensipsctlrc: line 23: DBHOST:
command not found
<br>
<b> MySQL password for root: </b><font color="#cc0000">
(I am sure password here is correct)</font><b><br>
</b><b> INFO: test server charset
</b><b><br>
</b><b> ERROR 1045 (28000): Access denied for user
'root'@'localhost' (using password: YES)
</b><b><br>
</b><b> ERROR 1045 (28000): Access denied for user
'root'@'localhost' (using password: YES)
</b><b><br>
</b><b> Usage: grep [OPTION]... PATTERN [FILE]...
</b><b><br>
</b><b> Try `grep --help' for more information.
</b><b><br>
</b><b> ./opensipsdbctl.mysql: line 114: [: =: unary operator
expected
</b><b><br>
</b><b> INFO: creating database opensips ...
</b><b><br>
</b><b> ERROR 1045 (28000): Access denied for user
'root'@'localhost' (using password: YES)
</b><b><br>
</b><b> ERROR 1045 (28000): Access denied for user
'root'@'localhost' (using password: YES)
</b><b><br>
</b><b> ERROR: Creating core database and grant privileges
failed!
</b><b><br>
<br>
<br>
</b><br>
<br>
////////////////////////////////////////////////////////////// #<b>
cat /etc/opensips/opensipsctlrc
</b><br>
# $Id: opensipsctlrc 7337 2010-10-28 22:02:46Z osas $
<br>
#
<br>
# The OpenSIPS configuration file for the control tools.
<br>
#
<br>
# Here you can set variables used in the opensipsctl and
opensipsdbctl setup
<br>
# scripts. Per default all variables here are commented out, the
control tools
<br>
# will use their internal default values.
<br>
<br>
## your SIP domain
<br>
SIP_DOMAIN=remoteip<br>
<br>
## chrooted directory
<br>
# $CHROOT_DIR="/path/to/chrooted/directory"
<br>
<br>
## database type: MYSQL, PGSQL, ORACLE, DB_BERKELEY, or DBTEXT, <br>
## by default none is loaded
<br>
# If you want to setup a database with opensipsdbctl, you must at
least specify
<br>
# this parameter.
<br>
DBENGINE=MYSQL
<br>
<br>
## database host
<br>
#DBHOST=localhost
<br>
<b>DBHOST = remoteip
</b><br>
## database name (for ORACLE this is TNS name)
<br>
DBNAME=opensips
<br>
<br>
# database path used by dbtext or db_berkeley
<br>
DB_PATH="/usr/local/etc/opensips/dbtext"
<br>
<br>
## database read/write user
<br>
DBRWUSER=opensips
<br>
<br>
## password for database read/write user
<br>
DBRWPW="opensipsrw"
<br>
<br>
## database read only user
<br>
DBROUSER=opensipsro
<br>
<br>
## password for database read only user
<br>
DBROPW=opensipsro
<br>
<br>
## database super user (for ORACLE this is 'scheme-creator' user)
<br>
DBROOTUSER="root"
<br>
<br>
# user name column
<br>
USERCOL="username"
<br>
<br>
<br>
# SQL definitions
<br>
# If you change this definitions here, then you must change them <br>
# in db/schema/entities.xml too.
<br>
# FIXME
<br>
<br>
# FOREVER="2020-05-28 21:32:15"
<br>
# DEFAULT_ALIASES_EXPIRES=$FOREVER
<br>
# DEFAULT_Q="1.0"
<br>
# DEFAULT_CALLID="Default-Call-ID"
<br>
# DEFAULT_CSEQ="13"
<br>
# DEFAULT_LOCATION_EXPIRES=$FOREVER
<br>
<br>
<br>
# Program to calculate a message-digest fingerprint <br>
# MD5="md5sum"
<br>
<br>
# awk tool
<br>
# AWK="awk"
<br>
<br>
# grep tool
<br>
# GREP="grep"
<br>
<br>
# sed tool
<br>
# SED="sed"
<br>
<br>
<br>
# Describe what additional tables to install. Valid values for the
variables
<br>
# below are yes/no/ask. With ask (default) it will interactively ask
the user
<br>
# for an answer, while yes/no allow for automated, unassisted
installs.
<br>
#
<br>
<br>
# If to install tables for the modules in the EXTRA_MODULES
variable.
<br>
# INSTALL_EXTRA_TABLES=ask
<br>
<br>
# If to install presence related tables.
<br>
# INSTALL_PRESENCE_TABLES=ask
<br>
<br>
# Define what module tables should be installed.
<br>
# If you use the postgres database and want to change the installed
tables,
<br>
# then you must also adjust the STANDARD_TABLES or EXTRA_TABLES
variable <br>
# accordingly in the opensipsdbctl.base script.
<br>
<br>
# opensips standard modules
<br>
# STANDARD_MODULES="standard acc lcr domain group permissions
registrar usrloc <br>
# msilo alias_db uri_db speeddial avpops auth_db
pdt dialog <br>
# dispatcher dialplan drouting nathelper
load_balancer"
<br>
<br>
# opensips extra modules
<br>
# EXTRA_MODULES="imc cpl siptrace domainpolicy carrierroute
userblacklist b2b"
<br>
<br>
<br>
## type of aliases used: DB - database aliases; UL - usrloc aliases
<br>
## - default: none
<br>
# ALIASES_TYPE="DB"
<br>
<br>
## control engine: FIFO or UNIXSOCK
<br>
## - default FIFO
<br>
# CTLENGINE=xmlrpc
<br>
<br>
## path to FIFO file
<br>
OSIPS_FIFO="/tmp/opensips_fifo"
<br>
<br>
## MI_CONNECTOR control engine: FIFO, UNIXSOCK, UDP, XMLRPC
<br>
MI_CONNECTOR=FIFO:/tmp/opensips_fifo
<br>
# MI_CONNECTOR=UNIXSOCK:/tmp/opensips.sock
<br>
# MI_CONNECTOR=UDP:192.168.2.133:8000
<br>
# MI_CONNECTOR=XMLRPC:192.168.2.133:8000
<br>
<br>
## check ACL names; default on (1); off (0)
<br>
# VERIFY_ACL=1
<br>
<br>
## ACL names - if VERIFY_ACL is set, only the ACL names from below
list
<br>
## are accepted
<br>
# ACL_GROUPS="local ld int voicemail free-pstn"
<br>
<br>
## verbose - debug purposes - default '0'
<br>
# VERBOSE=1
<br>
<br>
## do (1) or don't (0) store plaintext passwords
<br>
## in the subscriber table - default '1'
<br>
# STORE_PLAINTEXT_PW=0
<br>
<br>
## OPENSIPS START Options
<br>
## PID file path - default is: /var/run/opensips.pid
<br>
# PID_FILE=/var/run/opensips.pid
<br>
<br>
## Extra start options - default is: not set
<br>
# example: start opensips with 64MB share memory: STARTOPTIONS="-m
64"
<br>
# STARTOPTIONS=<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
maybe I forget some configurations.
<br>
I really don't kown how to solve it, who can help me, thanks in
advance.
<br>
</body>
</html>