another mysql problem (my first time)

Radoslaw
2012-12-16
2013-05-09
  • Radoslaw
    Radoslaw
    2012-12-16

    still getting these errors :

    ]ERROR:db_mysql:db_mysql_connect: driver error(1045): Access denied for user 'opensips'@'localhost' (using password: YES)
    

    but i just have no idea what went wrong …

    my  opensips.cfg

    modparam("usrloc", "db_mode",   2)
    modparam("usrloc", "db_url",
            "mysql://opensips:somepass@localhost/opensips") # CUSTOMIZE ME
    modparam("usrloc","hash_size",7)
    #### REGISTRAR module
    loadmodule "registrar.so"
    modparam("registrar", "tcp_persistent_flag", 7)
    /* uncomment the next line not to allow more than 10 contacts per AOR */
    #modparam("registrar", "max_contacts", 10)
    #### ACCounting module
    loadmodule "acc.so"
    /* what special events should be accounted ? */
    modparam("acc", "early_media", 0)
    modparam("acc", "report_cancels", 0)
    /* by default we do not adjust the direct of the sequential requests.
       if you enable this parameter, be sure the enable "append_fromtag"
       in "rr" module */
    modparam("acc", "detect_direction", 0)
    modparam("acc", "failed_transaction_flag", 3)
    /* account triggers (flags) */
    modparam("acc", "db_flag", 1)
    modparam("acc", "db_missed_flag", 2)
    modparam("acc", "db_url",
            "mysql://opensips:somepass@localhost/opensips") # CUSTOMIZE ME
    #### AUTHentication modules
    loadmodule "auth.so"
    loadmodule "auth_db.so"
    modparam("auth_db", "calculate_ha1", yes)
    modparam("auth_db", "password_column", "password")
    modparam("auth_db", "db_url",
            "mysql://opensips:Ave666+-@localhost/opensips") # CUSTOMIZE ME
    modparam("auth_db", "load_credentials", "")
    #### ALIAS module
    loadmodule "alias_db.so"
    modparam("alias_db", "db_url",
            "mysql://opensips:somepass@localhost/opensips") # CUSTOMIZE ME
    #### DIALOG module
    loadmodule "dialog.so"
    modparam("dialog", "dlg_match_mode", 1)
    modparam("dialog", "default_timeout", 21600)  # 6 hours timeout
    modparam("dialog", "db_mode", 2)
    modparam("dialog", "db_url",
            "mysql://opensips:somepass@localhost/opensips") # CUSTOMIZE ME
    modparam("dialog", "hash_size", 128)
    

    i can log to mysql with opensips account and i have acces to opensips database

    --------------------------+
    | Grants for opensips@%                                                                                                                                                                                                           |
    +-------------------------------------------------------------------------------                                                                                                                        --------------------------+
    | GRANT USAGE ON *.* TO 'opensips'@'%' IDENTIFIED BY PASSWORD '*972BA6E326523409                                                                                                                        6DBE9D0E7686AED4997155E8' |
    | GRANT ALL PRIVILEGES ON `opensips`.* TO 'opensips'@'%'                                                                                                                                                                          |
    +-------------------------------------------------------------------------------                                                                                                                        --------------------------+
    

    I will be greatfull for any suggestions?

     
  • apsaras
    apsaras
    2013-01-06

    Try the following to mysql cli

    GRANT ALL ON opensips.* To opensips@'localhost' IDENTIFIED BY 'somepass';
    

    Problem must be on MySQL site.