<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#ffffff">
    Il 24/01/2011 16:43, Jonas Kellens ha scritto:
    <blockquote cite="mid:4D3D9E25.50900@telenet.be" type="cite">
      <meta http-equiv="content-type" content="text/html;
        charset=ISO-8859-1">
      <font face="Helvetica, Arial, sans-serif">Hello list,<br>
        <br>
        I keep on getting the error :<br>
        <br>
        ERROR[1707] cdr_addon_mysql.c: Cannot connect to database server
        127.0.0.1: (1045) Access denied for user
        'asteriskcdr'@'localhost'
        (using password: YES)<br>
        <br>
        <br>
        I have a 'cdr' table in my MySQL-DB. On this table the user
        'asteriskcdr' has select, insert, update privileges.<br>
        <br>
        <span class="syntax"><span class="syntax_alpha
            syntax_alpha_reservedWord">GRANT</span> <span
            class="syntax_alpha syntax_alpha_reservedWord">SELECT</span>
          <span class="syntax_punct syntax_punct_listsep">,</span> <span
            class="syntax_alpha syntax_alpha_reservedWord">INSERT</span>
          <span class="syntax_punct syntax_punct_listsep">,</span><span
            class="syntax_alpha syntax_alpha_reservedWord">UPDATE</span>
          <span class="syntax_alpha syntax_alpha_reservedWord">ON</span>
          <span class="syntax_quote syntax_quote_backtick">`Asterisk`</span><span
            class="syntax_punct syntax_punct_qualifier">.</span><span
            class="syntax_quote syntax_quote_backtick">`cdr`</span> <span
            class="syntax_alpha syntax_alpha_reservedWord">TO</span> <span
            class="syntax_quote syntax_quote_single">'asteriskcdr'</span><span
            class="syntax_punct syntax_punct_user">@</span><span
            class="syntax_quote syntax_quote_single">'127.0.0.1'</span><span
            class="syntax_punct syntax_punct_queryend">;</span></span><br>
      </font><font face="Helvetica, Arial, sans-serif"><br>
        <br>
        cdr_mysql.conf :<br>
        <br>
        [global]<br>
        hostname=127.0.0.1<br>
        dbname=Asterisk<br>
        table=cdr<br>
        password=mysecret<br>
        user=asteriskcdr<br>
        port=3306<br>
        sock=/tmp/mysql.sock<br>
        userfield=1<br>
        <br>
        I really don't know why Asterisk cannot connect to the table..<br>
        <br>
        <br>
        Kind regards,<br>
        Jonas.<br>
      </font>
      <pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by <a class="moz-txt-link-freetext" href="http://www.api-digital.com">http://www.api-digital.com</a> --
New to Asterisk? Join us for a live introductory webinar every Thurs:
               <a class="moz-txt-link-freetext" href="http://www.asterisk.org/hello">http://www.asterisk.org/hello</a>

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   <a class="moz-txt-link-freetext" href="http://lists.digium.com/mailman/listinfo/asterisk-users">http://lists.digium.com/mailman/listinfo/asterisk-users</a></pre>
    </blockquote>
    Hi, try to do as follow. (sorry for my english)<br>
    <br>
    From server console<br>
    <br>
    Connect to mysql with admin privileges --&gt; i.e. command: mysql
    -uroot -pyourpassword<br>
    change db to asterisk --&gt; command: use asterisk;<br>
    define for your user the right password --&gt; command: SET PASSWORD
    FOR '<font face="Helvetica, Arial, sans-serif"><span class="syntax"><span
          class="syntax_quote syntax_quote_single">asteriskcdr</span></span></font>'@'localhost'
    = PASSWORD('mypassword');<br>
    disconnect from mysql and reconnect with asteriskcdr user so to
    verify that user grant and access are ok. If the user configuration
    is ok but there are still problems you can now check in other
    direction. If not you solved your problem<br>
    <br>
    Please let me know if I had help you.<br>
    <br>
    Have a nice evening<br>
    Enrico<br>
  </body>
</html>