Perfect SpamSnake p05, mysql connect

Discussion in 'HOWTO-Related Questions' started by stanman, Jun 12, 2009.

  1. stanman

    stanman New Member

    hi,
    I'm trying the Perfect SpamSnake how to and everything is looking good.
    Exept when I reach :

    Now for recovering the bayes_dbm to bayes_sql.

    sa-learn -p /etc/MailScanner/spam.assassin.prefs.conf --restore sa_bayes_backup.txt

    This gives me an error with the restore.

    Running it with the -D option gives me:
    [32441] dbg: replacetags: done replacing tags
    [32441] dbg: bayes: using username: root
    [32441] dbg: bayes: unable to connect to database: Access denied for user 'sa_user'@'localhost' (using password: YES)
    [32441] dbg: config: score set 1 chosen.
    [32441] dbg: bayes: unable to connect to database: Access denied for user 'sa_user'@'localhost' (using password: YES)
    [32441] dbg: bayes: unable to connect to database: Access denied for user 'sa_user'@'localhost' (using password: YES)

    Looks like i can't connect to the mysql database with sa_user, I've copied the right credentials into spam.assassin.prefs.conf, and can connect to mysql with sa_user from the command line...

    spam.assassing.prefs.conf looks like:
    bayes_store_module Mail::SpamAssassin::BayesStore::SQL
    bayes_sql_dsn DBI:mysql:sa_bayes:localhost
    bayes_sql_username sa_user
    bayes_sql_password My sa_user's password
    bayes_sql_override_username root

    Is there some other place i also need to put the mysql credentials in?

    Regards
     
  2. stanman

    stanman New Member

    oh yes: when i connect to the mysql sa_bayes db, I can view the tables (which are empty ofcourse, but they're there and i can connect with the sa_user)
     

Share This Page