please follow these step to run mysql module if ur mysql run the reply me once.

A database is needed to support a number of functions within ser. Namely authentication and accounting. In our configuration we have used MySQL, other databases can be supported but will require a different setup.

We are assuming that you have a working MySQL database with a root password. Of course, you will also need the development MySQL package loaded as it contains the header files for the source code.

To support MySQL, three steps are needed :-

   1.      Modify the source, rebuild and reinstall the binaries
   2.      Modify MySQL to support the database and tables needed
   3.      Modify the ser.cfg to use the database

All the source has already been loaded, what we need to change is the Makefile so that we now include the MySQL module. Edit the file src/sip_router/Makefile and at the line starting exclude_modules= remove the reference to mysql. Save the file and then recompile the code with the command make all. Reinstall the binaries by taking root privileges and executing make install.

MySQL needs to be modified to support the SER database and tables. Again take on root privileges and execute

(i)    /etc/rc.d/init.d/mysqld start
(ii)     make dbinstall.


You will be asked for the root MySQL password(heslo) and also the realm(domain=ip of your sip server) that you want.




o Configure the install, ie the mysql password and the ser database password
                + View /usr/sbin/ser_mysql.sh, where the following are defined
                  DBHOST=localhost
                  USERNAME=ser
                  DEFAULT_PW=heslo
                  ROUSER=serro
                  RO_PW=47serro11
                  SQL_USER="root"
                  DEFAULT_PW=heslo
# DEFAULT_PW is the password used by serctl to add users etc! Create the SER                  database with this SER script

o Run the SER script to create the SER database in mysql.
 
            /usr/sbin/ser_mysql.sh create
            Notes:
            MySql password for root: BLANK
            Domain (Realm) is the domain name for the SIP users: nctu.edu.tw
            Second password: BLANK

o Enter mysql and check that the tables have been created, follow these commands
  to check it is working correctly:
 
            mysql
            connect ser;
            show tables;
            select * from subscriber;
            exit



o Edit the SER configuration file "/usr/local/etc/ser/ser.cfg" so that SER will use mysql
            + Uncomment the line loadmodule "/usr/lib/ser/modules/mysql.so"
            + Comment the line modparam("usrloc", "db_mode", 0)
            + Uncomment the line modparam("usrloc", "db_mode", 2)
            + to enable digest authentication:
            # Uncomment the line loadmodule /usr/lib/ser/modules/auth.so
            # Uncomment the line loadmodule /usr/lib/ser/modules/auth_db.so
            + Uncomment these lines and change all instances of iptel.org to nctu.edu.tw
            # if (!www_authorize("nctu.edu.tw", "subscriber")) {
            # www_challenge("nctu.edu.tw", "0");

o Restart SER so that the changes take effect

            cd /usr/local/lib/mysql
            ln -s libmysqlclient.so.12 libmysqlclient.so.10
            # temporary solution
            kill `cat /var/run/ser.pid`
            /usr/local/sbin/ser -P /var/run/ser.pid
* Create two users using serctl. IMPORTANT NOTE : YOU MUST BE LOGGED IN AS ROOT (NOT JUST sudo)!!!!!!!
      Format of the command is: serctl add <username> <password> <email>
      and you need to use the DEFAULT_PW=heslo as the password set in /usr/sbin/ser_mysql.sh
      /usr/sbin/serctl add quincy password quincy@6ren.net.tw
      /usr/sbin/serctl add solomon password solomon@ipv6.org.tw
* Test the connection using two SIP UAs.

       o See the examles of how to configure UAs.
       o Use the this command to see who is logged in:
         serctl ul show

 

 




Errors:1
root@bishthost sbin]# ser
 0(3448) WARNING: fix_socket_list: could not rev. resolve 192.168.5.93
 0(3448) WARNING: fix_socket_list: could not rev. resolve 192.168.5.93
Listening on
             udp: 192.168.5.93 [192.168.5.93]:5060
             tcp: 192.168.5.93 [192.168.5.93]:5060
Aliases:

stateless - initializing
[root@bishthost sbin]#  0(0) Maxfwd module- initializing
 0(0) new_connection(): Access denied for user 'root'@'192.168.5.93' (using pass word: YES)
 0(0) db_init(): Could not create a connection
 0(0) ERROR: uridb_db_ver: unable to open database connection
 0(0) ERROR: uri_db:mod_init(): Error while querying table version
 0(0) init_mod(): Error while initializing module uri_db
ERROR: error while initializing modules

solutions:

The password for mysql is not good and openser fails to authenticate to database server.

Try "mysql -u openser -h localhost -p" with the same pasword you set in ser.cfg (configuration file)



Error2:
mysql> mysql
    -> connect ser;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'mysql
connect ser' at line 1
solutions
just recennect the datebase(ser) by this command
    
     mysql> \r ser

Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Connection id:    131
Current database: ser


Error3:
[root@bishthost ser]# ser
   0(3666) WARNING: fix_socket_list: could not rev. resolve
192.168.5.93
   0(3666) WARNING: fix_socket_list: could not rev. resolve
192.168.5.93
  Listening on
               udp: 192.168.5.93 [192.168.5.93]:5060
               tcp: 192.168.5.93 [192.168.5.93]:5060
  Aliases:
 
  stateless - initializing
  [root@bishthost ser]#  0(0) Maxfwd module- initializing
   0(0) INFO: udp_init: SO_RCVBUF is initially 110592
   0(0) INFO: udp_init: SO_RCVBUF is finally 221184
   0(0) ERROR: tcp_init: bind(5, 0x8117144, 16) on 192.168.5.93:
Address already in use

solution:
I think you have started SER already, or something use port 5060 on
your host.

try to do this:

serctl stop

or

killall ser


Chris Parkinson <chris.parkinson@cox.net> wrote:
So.. Embarrassingly enough... it turns out you need the
ser-mysql-module.

Chris

-----Original Message-----
From: serusers-bounces@lists.iptel.org
[mailto:serusers-bounces@lists.iptel.org] On Behalf Of Chris Parkinson
Sent: Tuesday, October 24, 2006 9:35 AM
To: serusers@lists.iptel.org
Subject: RE: [Serusers] MySQL confusion

That's probably it.... the script ser_mysql.sh doesn't exist on my
machine, that may be because I installed ser from debian testing using
apt-get.

I just removed it using apt-get remove.
I'm now trying to install the *.deb packages direct from iptel ftp, but
I'm running into problems as I can't find the order in which to install
the *.deb, the ser_0.9.6-0.1_i386.deb module complains about a bad
config file, even when I use the "hello world" example config.

I play around with it some more tonight.

Chris

-----Original Message-----
From: Alexandr Dubovikov [mailto:shurik@start4.info]
Sent: Tuesday, October 24, 2006 1:18 AM
To: Chris Parkinson
Cc: serusers@lists.iptel.org
Subject: Re: [Serusers] MySQL confusion

On Tue, Oct 24, 2006 at 12:11:21AM -0700, Chris Parkinson wrote:
> Hello,

Hi,

>
> I'm a complete newbie to SER and I'm having a problem
> following the MySQL section of the "getting started" guide.
>
>

Did you run "ser_mysql.sh" before ?


Wbr,
--
Alexandr Dubovikov * baron@iRC RusNet * mailto:shurik@start4.info
AD1-UANIC * ICQ: 122351182 * http://www.start4.info

_______________________________________________
Serusers mailing list
Serusers@lists.iptel.org
http://lists.iptel.org/mailman/listinfo/serusers

_______________________________________________
Serusers mailing list
Serusers@lists.iptel.org
http://lists.iptel.org/mailman/listinfo/serusers


Do you Yahoo!?
Everyone is raving about the all-new Yahoo! Mail.