[SOLVED] Roundcube can't connect to database

Discussion in 'Installation/Configuration' started by DrMartinus, May 24, 2018.

  1. DrMartinus

    DrMartinus Member HowtoForge Supporter

    I know this has been discussed more than once, still the offered solutions and my intelligence don't help past the following message:
    Code:
    DATABASE ERROR: CONNECTION FAILED!
    Unable to connect to the database!
    Please contact your server-administrator.
    I am the server administrator. I'm in the process of setting up a virtual server running CentOS 7.5 (I believe, or it's 7.4) and followed the tutorial for CentOS 7.4 to the letter. Yet, roundcube refuses to work. I tried several things: I got into the database with myphpadmin, found the user, found that it hadn't been granted write access, so I gave those. Yet the same error message. I also found that the password was written witholut encryption in the database, so I put it in again with the aprropriate mysql command, and now it's encrypted. But still roundcube doesn't want to do the installation properly. There it always tells me:
    Code:
    "DSN (write):  NOT OK(SQLSTATE[28000] [1045] Access denied for user 'roundcubeuser'@'localhost' (using password: YES))"
    Any help will be appreciated.
     
  2. ztk.me

    ztk.me ISPConfig Developer ISPConfig Developer

    if it says access denied, something is wrong. I have trust in the code responsible for that ;)

    check that the user exists
    check the password is defnitly correct set and used for login
    check the user is allowed to authenticate from/to the correct hosts, this can be 127.0.0.1,localhost,% ... see docs for more.
    check you use the allowed hostname ( %, localhost ... ) to test your connection
    $mysql -uuser -p -h localhost dbname
    check the explicit user ( [email protected] ) used has access to the database
    try on mysql console
    FLUSH PRIVILEGES;
    or restart db server.

    still doesn't work?
     
  3. DrMartinus

    DrMartinus Member HowtoForge Supporter

    Me too (not being responsible for that, but having trust). You're doing a great job here. Restarting db server did the trick. Why didn't I think of it earlier???
     

Share This Page