Roundcube installation problem

Discussion in 'Installation/Configuration' started by LinuxPete, Aug 12, 2019.

  1. LinuxPete

    LinuxPete Member

    I'm installing the perfect server Debian 10, w/apache, roundcube webmail, etc.
    When I got to the optional step #19 Installing roundcube, the echo command did not work
    echo "CREATE DATABASE roundcube;" | mysql --defaults-file=/etc/mysql/debian.cnf
    ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
    I checked the debian.cnf file, and the password for root looked good, I can use it from the command line (mysql -u root -p) with no problems, there were no errors in the roundcube directory
    so I wound up creating the database manually and connecting to it with use database roundcube;
    However when I tried the install, I got a similar error:
    .....
    ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES).
    unable to connect to mysql server.
    error encountered creating user:
    my etc/mysql/debian.cnf looks good but for some reason it won't see or use the root password.
    Zipline5 is not the real password.
    # Automatically generated for Debian scripts. DO NOT TOUCH!
    [client]
    host = localhost
    user = root
    password = Zipline5
    socket = /var/run/mysqld/mysqld.sock
    [mysql_upgrade]
    host = localhost
    user = root
    password = Zipline5
    socket = /var/run/mysqld/mysqld.sock
    basedir = /usr

    Any help would be appreciated.
    Thanks
    Ray
     
  2. Jesse Norell

    Jesse Norell Well-Known Member Staff Member Howtoforge Staff

    Seems like there was a "small" bug in a debian package so that /etc/mysql/debian.cnf didn't work, or similar. @Croydon had submitted a patch to address it. I've not followed the debian 10 tutorial yet, but check the comments for that, if the tutorial itself doesn't mention it, or failing that, search the forum here for the issue (in the past 3 weeks or so?).
     
  3. Jesse Norell

    Jesse Norell Well-Known Member Staff Member Howtoforge Staff

  4. LinuxPete

    LinuxPete Member

    Hey thanks Jesse for the link.
    I tried creating the patch and but still have the same error when I try to do an "echo" to create the database or for the "apt-get install..."
    I had to do a apt-get purge to get the dialog to come back and ask if I wanted to create a database. But it still failed as before.
    I also tried creating the DB from the mysql command line and then checking to see if it is there before I did an install. Nope. Got a failure when I tried the install.
    BTW. I did check the mysql file to make sure the patch was there.
     
  5. LinuxPete

    LinuxPete Member

    Question. Can I continue with the ISPCONFIG3 to be able to create the virtual hosts, and install webmail/squirrel manually?
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    Sure, ispconfig does not rely on squirrelmail.
     
  7. LinuxPete

    LinuxPete Member

    thanks, will finish install.
     
  8. Frank32

    Frank32 New Member

    Apparently the problem is the password notation in the debian.cnf file. When I get to step 19 to install roundcube and first put the passwords in debian.cnf between double quotes, the error is gone. After creating the roundcube database, I removed the double quotes again. Not sure if the double quotes may hurt if I leave them.
     
  9. till

    till Super Moderator Staff Member ISPConfig Developer

    If your password contains e.g. a white space or a single quote or # or $, then you must enclse them in double quotes. so a password like:

    GFT52Sd8.FGt

    does not has to be enclosed in double quotes, while e.g.:

    agV$ 'Hbag5

    as a password needs to be enclosed in double-quotes. There might be some more special chars that might affect this, I just mentioned the ones that are most obvious. as they enclose strings themself like single quotes or start a variable like $ or start a comment like #.
     
  10. Frank32

    Frank32 New Member

    That explains it. I have * and # in the password. However it doesn't seem to be a problem overall. The only issue I have found so far is with the first command in step 19 (echo "CREATE DATABASE roundcube;" | mysql --defaults-file=/etc/mysql/debian.cnf). I had my previous server running for several months without any issues. But I assume it is best practice to enclose the password in double quotes when using special characters.
     
  11. Frank32

    Frank32 New Member

    Interesting. At step 19 (Roundcube) the first command requires a passwords with special characters in /etc/mysql/debian.cnf between double quotes. With the second command, when the roundcube database is being configured while the password is between double quotes, errors occur:
    Code:
    ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES).
    unable to connect to mysql server.
    error encountered creating user:
    ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
    dbconfig-common: roundcube configure: aborted.
    dbconfig-common: flushing administrative password
    dpkg: error processing package roundcube-core (--configure):
     installed roundcube-core package post-installation script subprocess returned error exit status 1
    dpkg: dependency problems prevent configuration of roundcube-plugins:
     roundcube-plugins depends on roundcube-core (= 1.3.16+dfsg.1-1~deb10u1); however:
      Package roundcube-core is not configured yet.
    
    dpkg: error processing package roundcube-plugins (--configure):
     dependency problems - leaving unconfigured
    dpkg: dependency problems prevent configuration of roundcube:
     roundcube depends on roundcube-core (= 1.3.16+dfsg.1-1~deb10u1); however:
      Package roundcube-core is not configured yet.
    
    dpkg: error processing package roundcube (--configure):
     dependency problems - leaving unconfigured
    Processing triggers for man-db (2.8.5-2) ...
    Errors were encountered while processing:
     roundcube-core
     roundcube-plugins
     roundcube
    E: Sub-process /usr/bin/dpkg returned an error code (1)
    The solution is to remove the double quotes for the password.
     

Share This Page