please follow these step to run mysql module if ur mysql run the reply me once.<br> <br> 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.<br> <br> 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.<br> <br> To support MySQL, three steps are needed :-<br> <br> &nbsp;&nbsp; 1.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Modify the source, rebuild and reinstall the binaries<br> &nbsp;&nbsp; 2.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Modify MySQL to support the database and tables needed<br> &nbsp;&nbsp; 3.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Modify the ser.cfg to use the database<br> <br> 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.<br> <br> MySQL needs to be modified to support the SER database and tables. Again take on root privileges and execute <br> <br> (i)&nbsp;&nbsp;&nbsp; /etc/rc.d/init.d/mysqld start<br> (ii) &nbsp;&nbsp;&nbsp; make dbinstall. <br> <br> <br> You will be asked for the root MySQL password(heslo) and also the realm(domain=ip of your sip server) that you want. <br> <br> <br> <br> <br> o Configure the install, ie the mysql password and the ser database password<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; + View /usr/sbin/ser_mysql.sh, where the following are defined<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
 DBHOST=localhost<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; USERNAME=ser<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; DEFAULT_PW=heslo<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ROUSER=serro<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; RO_PW=47serro11<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SQL_USER="root"<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; DEFAULT_PW=heslo<br> # DEFAULT_PW is the password used by serctl to add users etc! Create the SER&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp; database with this SER script<br> <br> o Run the SER script to create the
 SER database in mysql.<br> &nbsp; <br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /usr/sbin/ser_mysql.sh create<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Notes:<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; MySql password for root: BLANK<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Domain (Realm) is the domain name for the SIP users: nctu.edu.tw<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Second password: BLANK<br> <br> o Enter mysql and check that the tables have been created, follow these commands<br> &nbsp; to check it is working correctly:<br> &nbsp; <br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; mysql<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; connect ser;<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; show tables;<br>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; select * from subscriber;<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; exit<br> <br> <br> <br> o Edit the SER configuration file "/usr/local/etc/ser/ser.cfg" so that SER will use mysql<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; + Uncomment the line loadmodule "/usr/lib/ser/modules/mysql.so"<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; + Comment the line modparam("usrloc", "db_mode", 0)<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; + Uncomment the line modparam("usrloc", "db_mode", 2)<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; + to enable digest authentication:<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # Uncomment the line loadmodule /usr/lib/ser/modules/auth.so<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # Uncomment the
 line loadmodule /usr/lib/ser/modules/auth_db.so<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; + Uncomment these lines and change all instances of iptel.org to nctu.edu.tw<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # if (!www_authorize("nctu.edu.tw", "subscriber")) {<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # www_challenge("nctu.edu.tw", "0");<br> <br> o Restart SER so that the changes take effect<br> <br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cd /usr/local/lib/mysql<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ln -s libmysqlclient.so.12 libmysqlclient.so.10<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # temporary solution<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; kill `cat /var/run/ser.pid`<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /usr/local/sbin/ser -P
 /var/run/ser.pid<br> * Create two users using serctl. IMPORTANT NOTE : YOU MUST BE LOGGED IN AS ROOT (NOT JUST sudo)!!!!!!!<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Format of the command is: serctl add &lt;username&gt; &lt;password&gt; &lt;email&gt;<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; and you need to use the DEFAULT_PW=heslo as the password set in /usr/sbin/ser_mysql.sh<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /usr/sbin/serctl add quincy password quincy@6ren.net.tw<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /usr/sbin/serctl add solomon password solomon@ipv6.org.tw<br> * Test the connection using two SIP UAs.<br> <br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; o See the examles of how to configure UAs.<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; o Use the this command to see who is logged in:<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; serctl ul show<br> <br> &nbsp;<br> <br> &nbsp;<br> <br> <br> <br> <br> Errors:1<br> root@bishthost sbin]# ser<br> &nbsp;0(3448) WARNING: fix_socket_list: could
 not rev. resolve 192.168.5.93<br> &nbsp;0(3448) WARNING: fix_socket_list: could not rev. resolve 192.168.5.93<br> Listening on<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; udp: 192.168.5.93 [192.168.5.93]:5060<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; tcp: 192.168.5.93 [192.168.5.93]:5060<br> Aliases:<br> <br> stateless - initializing<br> [root@bishthost sbin]#&nbsp; 0(0) Maxfwd module- initializing<br> &nbsp;0(0) new_connection(): Access denied for user 'root'@'192.168.5.93' (using pass word: YES)<br> &nbsp;0(0) db_init(): Could not create a connection<br> &nbsp;0(0) ERROR: uridb_db_ver: unable to open database connection<br> &nbsp;0(0) ERROR: uri_db:mod_init(): Error while querying table version<br> &nbsp;0(0) init_mod(): Error while initializing module uri_db<br> ERROR: error while initializing modules<br> <br> solutions:<br> <br> The password for mysql is not good and openser fails to authenticate to
 database server.<br> <br> Try "mysql -u openser -h localhost -p" with the same pasword you set in ser.cfg (configuration file) <br> <br> <br> <br> Error2:<br> mysql&gt; mysql<br> &nbsp;&nbsp;&nbsp; -&gt; connect ser;<br> 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<br> connect ser' at line 1<br> solutions<br> just recennect the datebase(ser) by this command<br> &nbsp;&nbsp;&nbsp;&nbsp; <br> &nbsp;&nbsp;&nbsp;&nbsp; mysql&gt; \r ser<br> <br> Reading table information for completion of table and column names<br> You can turn off this feature to get a quicker startup with -A<br> <br> Connection id:&nbsp;&nbsp;&nbsp; 131<br> Current database: ser<br> <br> <br> Error3:<br> [root@bishthost ser]# ser<br> &nbsp;&nbsp; 0(3666) WARNING: fix_socket_list: could not rev. resolve <br> 192.168.5.93<br> &nbsp;&nbsp; 0(3666) WARNING: fix_socket_list: could not rev. resolve
 <br> 192.168.5.93<br> &nbsp; Listening on<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; udp: 192.168.5.93 [192.168.5.93]:5060<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; tcp: 192.168.5.93 [192.168.5.93]:5060<br> &nbsp; Aliases:<br> &nbsp; <br> &nbsp; stateless - initializing<br> &nbsp; [root@bishthost ser]#&nbsp; 0(0) Maxfwd module- initializing<br> &nbsp;&nbsp; 0(0) INFO: udp_init: SO_RCVBUF is initially 110592<br> &nbsp;&nbsp; 0(0) INFO: udp_init: SO_RCVBUF is finally 221184<br> &nbsp;&nbsp; 0(0) ERROR: tcp_init: bind(5, 0x8117144, 16) on 192.168.5.93: <br> Address already in use<br> <br> solution:<br> I think you have started SER already, or something use port 5060 on <br> your host.<br> <br> try to do this:<br> <br> serctl stop<br> <br> or <br> <br> killall ser <br> <br><br><b><i>Chris Parkinson &lt;chris.parkinson@cox.net&gt;</i></b> wrote:<blockquote class="replbq"
 style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"> So.. Embarrassingly enough... it turns out you need the<br>ser-mysql-module.<br><br>Chris<br><br>-----Original Message-----<br>From: serusers-bounces@lists.iptel.org<br>[mailto:serusers-bounces@lists.iptel.org] On Behalf Of Chris Parkinson<br>Sent: Tuesday, October 24, 2006 9:35 AM<br>To: serusers@lists.iptel.org<br>Subject: RE: [Serusers] MySQL confusion<br><br>That's probably it.... the script ser_mysql.sh doesn't exist on my<br>machine, that may be because I installed ser from debian testing using<br>apt-get.<br><br>I just removed it using apt-get remove.<br>I'm now trying to install the *.deb packages direct from iptel ftp, but<br>I'm running into problems as I can't find the order in which to install<br>the *.deb, the ser_0.9.6-0.1_i386.deb module complains about a bad<br>config file, even when I use the "hello world" example config.<br><br>I play around with it some more
 tonight.<br><br>Chris<br><br>-----Original Message-----<br>From: Alexandr Dubovikov [mailto:shurik@start4.info] <br>Sent: Tuesday, October 24, 2006 1:18 AM<br>To: Chris Parkinson<br>Cc: serusers@lists.iptel.org<br>Subject: Re: [Serusers] MySQL confusion<br><br>On Tue, Oct 24, 2006 at 12:11:21AM -0700, Chris Parkinson wrote:<br>&gt; Hello,<br><br>Hi,<br><br>&gt; <br>&gt;             I'm a complete newbie to SER and I'm having a problem<br>&gt; following the MySQL section of the "getting started" guide.<br>&gt; <br>&gt;  <br><br>Did you run "ser_mysql.sh" before ?<br><br><br>Wbr,<br>-- <br>Alexandr Dubovikov * baron@iRC RusNet * mailto:shurik@start4.info<br>    AD1-UANIC      *  ICQ: 122351182  *  http://www.start4.info<br><br>_______________________________________________<br>Serusers mailing list<br>Serusers@lists.iptel.org<br>http://lists.iptel.org/mailman/listinfo/serusers<br><br>_______________________________________________<br>Serusers mailing
 list<br>Serusers@lists.iptel.org<br>http://lists.iptel.org/mailman/listinfo/serusers<br></blockquote><br><p>&#32;
                <hr size=1>Do you Yahoo!?<br> Everyone is raving about the <a href="http://us.rd.yahoo.com/evt=42297/*http://advision.webevents.yahoo.com/mailbeta"> all-new Yahoo! Mail.</a>