I'm not sure, but I think DB user has no access to mysql tables. Try to connect to mysql database from the command prompt and give grant options to myuser.<br><br>Something like that:<br><span style="font-style: italic; color: rgb(51, 51, 255);">
<br>shell> mysql --user=root mysql<br><span style="font-style: italic;"><br></span></span><span style="font-style: italic; color: rgb(51, 51, 255);">If you have assigned a password to the root account, you'll also need to supply a --password or -p
</span><br style="font-style: italic; color: rgb(51, 51, 255);"><span style="font-style: italic; color: rgb(51, 51, 255);">option for this mysql command and also for those later in this section.</span><br style="font-style: italic; color: rgb(51, 51, 255);">
<span style="font-style: italic; color: rgb(51, 51, 255);">After connecting to the server as root, you can add new accounts. The following statements use<br><br style="font-style: italic; color: rgb(51, 51, 255);"></span>
<span style="font-style: italic; color: rgb(51, 51, 255);">GRANT to set up four new accounts:<br><br style="font-style: italic; color: rgb(51, 51, 255);"></span><span style="font-style: italic; color: rgb(51, 51, 255);">mysql> GRANT ALL PRIVILEGES ON *.* TO 'monty'@'localhost'
</span><br style="font-style: italic; color: rgb(51, 51, 255);"><span style="font-style: italic; color: rgb(51, 51, 255);">-> IDENTIFIED BY 'some_pass' WITH GRANT OPTION;</span><br style="font-style: italic; color: rgb(51, 51, 255);">
<span style="font-style: italic; color: rgb(51, 51, 255);">mysql> GRANT ALL PRIVILEGES ON *.* TO 'monty'@'%'</span><br style="font-style: italic; color: rgb(51, 51, 255);"><span style="font-style: italic; color: rgb(51, 51, 255);">
-> IDENTIFIED BY 'some_pass' WITH GRANT OPTION;</span><br style="font-style: italic; color: rgb(51, 51, 255);"><span style="font-style: italic; color: rgb(51, 51, 255);">mysql> GRANT RELOAD,PROCESS ON *.* TO 'admin'@'localhost';
</span><br style="font-style: italic; color: rgb(51, 51, 255);"><span style="font-style: italic; color: rgb(51, 51, 255);">mysql> GRANT USAGE ON *.* TO 'dummy'@'localhost';<br><br>For Asterisk Voice mail you have to write something like
<br><span style="font-style: italic;">mysql> </span>GRANT ALL PRIVILEGES ON <span style="color: rgb(255, 0, 0);">Asterisk.Voicemail</span> TO '<span style="color: rgb(255, 0, 0);">myuser'</span>@'<span style="color: rgb(255, 0, 0);">
localhost' </span>IDENTIFIED BY '<span style="color: rgb(255, 0, 0);">mypass' </span>WITH GRANT OPTION;<br><br><span style="text-decoration: underline;">Note</span>: In the example above Asterisk is a Database name and Voicemail is a Voice mail table.
<br></span><br><br><div><span class="gmail_quote">On 2/19/07, <b class="gmail_sendername">jamshed zaidi</b> <<a href="mailto:jamshed_z@hotmail.com">jamshed_z@hotmail.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>Hi Guys, I am new to asterisk development. I am facing real problems in<br>accessing voicemail contents like its password, username etc.... I am<br>writing the perl script for web interface that will reset the the password
<br>of voicemail from mysql database as commedian voicemail does change it in<br>asterisk. I am facing list of problems<br><br>1). How do i enable mysql support for voicemail in Asterisk1.4.0. For this i<br>have gone through the following article
<br><a href="http://www.voip-info.org/wiki/view/Asterisk+voicemail+database">http://www.voip-info.org/wiki/view/Asterisk+voicemail+database</a><br>but i didnt find "mysql-vm-routines.h" in asterisk-addonns-1.4.0
.<br><br>i updated my voicemail.conf file with<br>dbuser=myuser<br>dbname=asterisk<br>dbpass=mypass<br>dbhost=localhost<br><br>when i run my following perl script<br>my $DB_Name="asterisk";<br>my $DB_Host= "
<a href="http://127.0.0.1">127.0.0.1</a>";<br>my $DB_User="myuser";<br>my $DB_Pass="mypass";<br><br>my $dbh = DBI->connect("DBI:mysql:$dbname=$DB_Name","$DB_User","$DB_Pass");
<br>my $sth = $dbh->prepare(qq{select fullname,context from voicemail where<br>mailbox='1234' and password='1234' and context='[default]'});<br><br>THEN IT SHOWS THE FOLLOWING ERROR<br><br>"DBI connect('=asterisk','myuser',...) failed: Access denied for user
<br>'myuser'@'localhost' (using password: YES) at resetPass.pl line 15<br>Can't call method "prepare" on an undefined value at resetPass.pl line 16,<br><STDIN> line 1."<br><br>Please reply me as soon as possible.....thanx in advance
<br><br><br><html><div><PRE class=quote><IMG height=2<br>src="<a href="http://graphics.hotmail.com/greypixel.gif">http://graphics.hotmail.com/greypixel.gif</a>" width="100%"<br>vspace=9></PRE><PRE class=quote><FONT face="Courier New, Courier, Monospace"
<br>color=#000033 size=2>Syed Jamshed Zaidi<br><BR>Asterisk Admin/Developer<br><BR>@ Axvoice +92-0321-4087492<br><BR>(JAMY-VIRUS)</FONT></PRE><PRE class=quote><PRE class=quote><FONT
<br>face="Courier New, Courier, Monospace" color=#000033 size=2>"Shoot for the<br>moon. Even if you miss, you'll land among the<br>stars"</FONT></PRE></PRE></div></html>
<br><br>_________________________________________________________________<br>Don't just search. Find. Check out the new MSN Search!<br><a href="http://search.msn.com/">http://search.msn.com/</a><br><br>_______________________________________________
<br>--Bandwidth and Colocation provided by <a href="http://Easynews.com">Easynews.com</a> --<br><br>asterisk-dev mailing list<br>To UNSUBSCRIBE or update options visit:<br> <a href="http://lists.digium.com/mailman/listinfo/asterisk-dev">
http://lists.digium.com/mailman/listinfo/asterisk-dev</a><br></blockquote></div><br><br clear="all"><br>-- <br>Best Regards<br>Alexandr Olekhnovich