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> 1. Modify the source, rebuild and reinstall the binaries<br> 2. Modify MySQL to support the database and tables needed<br> 3. 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) /etc/rc.d/init.d/mysqld start<br> (ii) 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> + View /usr/sbin/ser_mysql.sh, where the following are defined<br>
DBHOST=localhost<br> USERNAME=ser<br> DEFAULT_PW=heslo<br> ROUSER=serro<br> RO_PW=47serro11<br> SQL_USER="root"<br> DEFAULT_PW=heslo<br> # DEFAULT_PW is the password used by serctl to add users etc! Create the SER database with this SER script<br> <br> o Run the SER script to create the
SER database in mysql.<br> <br> /usr/sbin/ser_mysql.sh create<br> Notes:<br> MySql password for root: BLANK<br> Domain (Realm) is the domain name for the SIP users: nctu.edu.tw<br> Second password: BLANK<br> <br> o Enter mysql and check that the tables have been created, follow these commands<br> to check it is working correctly:<br> <br> mysql<br> connect ser;<br> show tables;<br>
select * from subscriber;<br> exit<br> <br> <br> <br> o Edit the SER configuration file "/usr/local/etc/ser/ser.cfg" so that SER will use mysql<br> + Uncomment the line loadmodule "/usr/lib/ser/modules/mysql.so"<br> + Comment the line modparam("usrloc", "db_mode", 0)<br> + Uncomment the line modparam("usrloc", "db_mode", 2)<br> + to enable digest authentication:<br> # Uncomment the line loadmodule /usr/lib/ser/modules/auth.so<br> # Uncomment the
line loadmodule /usr/lib/ser/modules/auth_db.so<br> + Uncomment these lines and change all instances of iptel.org to nctu.edu.tw<br> # if (!www_authorize("nctu.edu.tw", "subscriber")) {<br> # www_challenge("nctu.edu.tw", "0");<br> <br> o Restart SER so that the changes take effect<br> <br> cd /usr/local/lib/mysql<br> ln -s libmysqlclient.so.12 libmysqlclient.so.10<br> # temporary solution<br> kill `cat /var/run/ser.pid`<br> /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> Format of the command is: serctl add <username> <password> <email><br> and you need to use the DEFAULT_PW=heslo as the password set in /usr/sbin/ser_mysql.sh<br> /usr/sbin/serctl add quincy password quincy@6ren.net.tw<br> /usr/sbin/serctl add solomon password solomon@ipv6.org.tw<br> * Test the connection using two SIP UAs.<br> <br> o See the examles of how to configure UAs.<br> o Use the this command to see who is logged in:<br> serctl ul show<br> <br> <br> <br> <br> <br> <br> <br> <br> Errors:1<br> root@bishthost sbin]# ser<br> 0(3448) WARNING: fix_socket_list: could
not rev. resolve 192.168.5.93<br> 0(3448) WARNING: fix_socket_list: could not rev. resolve 192.168.5.93<br> Listening on<br> udp: 192.168.5.93 [192.168.5.93]:5060<br> tcp: 192.168.5.93 [192.168.5.93]:5060<br> Aliases:<br> <br> stateless - initializing<br> [root@bishthost sbin]# 0(0) Maxfwd module- initializing<br> 0(0) new_connection(): Access denied for user 'root'@'192.168.5.93' (using pass word: YES)<br> 0(0) db_init(): Could not create a connection<br> 0(0) ERROR: uridb_db_ver: unable to open database connection<br> 0(0) ERROR: uri_db:mod_init(): Error while querying table version<br> 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> mysql<br> -> 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> <br> mysql> \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: 131<br> Current database: ser<br> <br> <br> Error3:<br> [root@bishthost ser]# ser<br> 0(3666) WARNING: fix_socket_list: could not rev. resolve <br> 192.168.5.93<br> 0(3666) WARNING: fix_socket_list: could not rev. resolve
<br> 192.168.5.93<br> Listening on<br> udp: 192.168.5.93 [192.168.5.93]:5060<br> tcp: 192.168.5.93 [192.168.5.93]:5060<br> Aliases:<br> <br> stateless - initializing<br> [root@bishthost ser]# 0(0) Maxfwd module- initializing<br> 0(0) INFO: udp_init: SO_RCVBUF is initially 110592<br> 0(0) INFO: udp_init: SO_RCVBUF is finally 221184<br> 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 <chris.parkinson@cox.net></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>> Hello,<br><br>Hi,<br><br>> <br>> I'm a complete newbie to SER and I'm having a problem<br>> following the MySQL section of the "getting started" guide.<br>> <br>> <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> 
                <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>