Discussion:
Error connecting to database: SQLSTATE[28000] [1045] Access denied for user 'roundcube'@'localhost'
Rob Badub
2014-09-01 19:45:38 UTC
Permalink
Hi all,

My name is Rob Badub and I'm new to Kolab. My system is a Ubuntu server
14.04 and I'm following the instructions that I've found on
http://docs.kolab.org/installation-guide/ubuntu.html

After executing the install script with

Sudo aptitude install kolab

it fails at the install for roundcubemail

The error message says:

E: Sub-process /usr/bin/dpkg returned an error code (1)
A package failed to install. Trying to recover:
Setting up roundcubemail (1:1.1~dev20140404-0~kolab3) ...
ERROR: Error connecting to database: SQLSTATE[28000] [1045] Access denied
for user 'roundcube'@'localhost' (using password: YES)ERROR: Site
roundcubemail does not exist!

Subsequently the following packages with dependencies fail as well.

dpkg: error processing package roundcubemail (--configure):
subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of kolab-freebusy:
kolab-freebusy depends on roundcubemail; however:
Package roundcubemail is not configured yet.

And the same for

roundcubemail-plugins-kolab
chwala
irony
kolab-freebusy
kolab-syncroton
roundcubemail-plugin-contextmenu
roundcubemail-plugin-threadingasdefault
kolab-webclient
kolab

Most informative errormessage:
ERROR: Error connecting to database: SQLSTATE[28000] [1045] Access denied
for user 'roundcube'@'localhost' (using password: YES)ERROR: Site
roundcubemail does not exist!

Options:
There is no user roundcube
It does not use the FQDN
Site roundcubemail does not exist (what does this mean?)

Please advice

Cheers,
Rob
Franz Skale
2014-09-01 20:32:56 UTC
Permalink
Hi,
setup kolab will ask you for a mysql root password on setup.
if you missed it, run setup-kolab -D 9 -l debug and show us the output.
If you hit enter, try this before rerunning dpkg --coonfigure -a:

login as root and create a file called .my.cnf
Add this:
[client]
port = 3306
socket = /var/run/mysqld/mysqld.sock
password = xxxxxxxxxx

Of course, use or own mysql root password.
then do a chmod 700 .my.cnf

Rerun the setup and continue.

Rgds.

Franz
Post by Rob Badub
Hi all,
My name is Rob Badub and I'm new to Kolab. My system is a Ubuntu server
14.04 and I'm following the instructions that I've found on
http://docs.kolab.org/installation-guide/ubuntu.html
After executing the install script with
Sudo aptitude install kolab
it fails at the install for roundcubemail
E: Sub-process /usr/bin/dpkg returned an error code (1)
Setting up roundcubemail (1:1.1~dev20140404-0~kolab3) ...
ERROR: Error connecting to database: SQLSTATE[28000] [1045] Access denied
roundcubemail does not exist!
Subsequently the following packages with dependencies fail as well.
subprocess installed post-installation script returned error exit status 1
Package roundcubemail is not configured yet.
And the same for
roundcubemail-plugins-kolab
chwala
irony
kolab-freebusy
kolab-syncroton
roundcubemail-plugin-contextmenu
roundcubemail-plugin-threadingasdefault
kolab-webclient
kolab
ERROR: Error connecting to database: SQLSTATE[28000] [1045] Access denied
roundcubemail does not exist!
There is no user roundcube
It does not use the FQDN
Site roundcubemail does not exist (what does this mean?)
Please advice
Cheers,
Rob
_______________________________________________
users mailing list
users at lists.kolab.org
https://lists.kolab.org/mailman/listinfo/users
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4254 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://lists.kolab.org/pipermail/users/attachments/20140901/36ed3167/attachment.p7s>
Rob Badub
2014-09-01 22:49:37 UTC
Permalink
Hi Franz,

Thanks for taking the time to help us out. Much appreciated :-)

At first it thought I knew the password so I tried your second suggestion. But it was not the correct password.

The I ran : setup-kolab -D 9 -l debug to see what was going on. I did not record the output but did copy the MySQL root password and put it in my.cnf, that already existed. Did the chmod.

I re-ran the setup with aptitude install kolab (which was where I left off)

This time the error is different:

E: Sub-process /usr/bin/dpkg returned an error code (1)
A package failed to install. Trying to recover:
Setting up roundcubemail (1:1.1~dev20140404-0~kolab3) ...
ERROR: Error connecting to database: SQLSTATE[HY000] [2002] Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)ERROR: Site roundcubemail does not exist!

This error I saw in the debug run as well...

I will try and reproduce the situation tomorrow. Now I will sleep a bit.

Cheers,
Rob


-----Original Message-----
From: users-bounces at lists.kolab.org [mailto:users-bounces at lists.kolab.org] On Behalf Of Franz Skale
Sent: maandag 1 september 2014 22:33
To: Rob Badub; users at lists.kolab.org
Subject: Re: Error connecting to database: SQLSTATE[28000] [1045] Access denied for user 'roundcube'@'localhost'



Hi,
setup kolab will ask you for a mysql root password on setup.
if you missed it, run setup-kolab -D 9 -l debug and show us the output.
If you hit enter, try this before rerunning dpkg --coonfigure -a:

login as root and create a file called .my.cnf Add this:
[client]
port = 3306
socket = /var/run/mysqld/mysqld.sock
password = xxxxxxxxxx

Of course, use or own mysql root password.
then do a chmod 700 .my.cnf

Rerun the setup and continue.

Rgds.

Franz
Post by Rob Badub
Hi all,
My name is Rob Badub and I'm new to Kolab. My system is a Ubuntu server
14.04 and I'm following the instructions that I've found on
http://docs.kolab.org/installation-guide/ubuntu.html
After executing the install script with
Sudo aptitude install kolab
it fails at the install for roundcubemail
E: Sub-process /usr/bin/dpkg returned an error code (1) A package
Setting up roundcubemail (1:1.1~dev20140404-0~kolab3) ...
ERROR: Error connecting to database: SQLSTATE[28000] [1045] Access
Site roundcubemail does not exist!
Subsequently the following packages with dependencies fail as well.
subprocess installed post-installation script returned error exit status 1
Package roundcubemail is not configured yet.
And the same for
roundcubemail-plugins-kolab
chwala
irony
kolab-freebusy
kolab-syncroton
roundcubemail-plugin-contextmenu
roundcubemail-plugin-threadingasdefault
kolab-webclient
kolab
ERROR: Error connecting to database: SQLSTATE[28000] [1045] Access
Site roundcubemail does not exist!
There is no user roundcube
It does not use the FQDN
Site roundcubemail does not exist (what does this mean?)
Please advice
Cheers,
Rob
_______________________________________________
users mailing list
users at lists.kolab.org
https://lists.kolab.org/mailman/listinfo/users
Rob Badub
2014-09-02 09:03:53 UTC
Permalink
Hi Franz,

Thanks once again for taking the time to help us out. Much appreciated :-)

At first it thought I knew the password so I tried your second suggestion.
But it was not the correct password.

The I ran : setup-kolab -D 9 -l debug to see what was going on. I did not
record the output but did copy the MySQL root password and put it in my.cnf,
that already existed. Did the chmod.

I re-ran the setup with aptitude install kolab (which was where I left off)

This time the error is different:

E: Sub-process /usr/bin/dpkg returned an error code (1) A package failed to
install. Trying to recover:
Setting up roundcubemail (1:1.1~dev20140404-0~kolab3) ...
ERROR: Error connecting to database: SQLSTATE[HY000] [2002] Can't connect to
local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)ERROR:
Site roundcubemail does not exist!

This error I saw in the debug run as well...

Please supply a root password for MySQL. This password will be the
administrative
user for this MySQL server, and it should be kept a secret. After this setup
process has completed, Kolab is going to discard and forget about this
password,
but you will need it for administrative tasks in MySQL.

MySQL root password [xxxxxxxxxxxxxxx]:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket
'/var/run/mysqld/mysqld.sock' (2)
ERROR 2002 (HY000): Can't connect to local MySQL server through socket
'/var/run/mysqld/mysqld.sock' (2)
ERROR 2002 (HY000): Can't connect to local MySQL server through socket
'/var/run/mysqld/mysqld.sock' (2)

So running the installer renders a problem when installing MySQL. After that
all fails.

Cheers,
Rob

-----Original Message-----
From: users-bounces at lists.kolab.org [mailto:users-bounces at lists.kolab.org]
On Behalf Of Franz Skale
Sent: maandag 1 september 2014 22:33
To: Rob Badub; users at lists.kolab.org
Subject: Re: Error connecting to database: SQLSTATE[28000] [1045] Access
denied for user 'roundcube'@'localhost'



Hi,
setup kolab will ask you for a mysql root password on setup.
if you missed it, run setup-kolab -D 9 -l debug and show us the output.
If you hit enter, try this before rerunning dpkg --coonfigure -a:

login as root and create a file called .my.cnf Add this:
[client]
port = 3306
socket = /var/run/mysqld/mysqld.sock
password = xxxxxxxxxx

Of course, use or own mysql root password.
then do a chmod 700 .my.cnf

Rerun the setup and continue.

Rgds.

Franz
Post by Rob Badub
Hi all,
My name is Rob Badub and I'm new to Kolab. My system is a Ubuntu server
14.04 and I'm following the instructions that I've found on
http://docs.kolab.org/installation-guide/ubuntu.html
After executing the install script with
Sudo aptitude install kolab
it fails at the install for roundcubemail
E: Sub-process /usr/bin/dpkg returned an error code (1) A package
Setting up roundcubemail (1:1.1~dev20140404-0~kolab3) ...
ERROR: Error connecting to database: SQLSTATE[28000] [1045] Access
Site roundcubemail does not exist!
Subsequently the following packages with dependencies fail as well.
subprocess installed post-installation script returned error exit status 1
Package roundcubemail is not configured yet.
And the same for
roundcubemail-plugins-kolab
chwala
irony
kolab-freebusy
kolab-syncroton
roundcubemail-plugin-contextmenu
roundcubemail-plugin-threadingasdefault
kolab-webclient
kolab
ERROR: Error connecting to database: SQLSTATE[28000] [1045] Access
Site roundcubemail does not exist!
There is no user roundcube
It does not use the FQDN
Site roundcubemail does not exist (what does this mean?)
Please advice
Cheers,
Rob
_______________________________________________
users mailing list
users at lists.kolab.org
https://lists.kolab.org/mailman/listinfo/users
Paul Boddie
2014-09-02 10:45:28 UTC
Permalink
Post by Rob Badub
Please supply a root password for MySQL. This password will be the
administrative
user for this MySQL server, and it should be kept a secret. After this
setup process has completed, Kolab is going to discard and forget about
this password,
but you will need it for administrative tasks in MySQL.
ERROR 2002 (HY000): Can't connect to local MySQL server through socket
'/var/run/mysqld/mysqld.sock' (2)
ERROR 2002 (HY000): Can't connect to local MySQL server through socket
'/var/run/mysqld/mysqld.sock' (2)
ERROR 2002 (HY000): Can't connect to local MySQL server through socket
'/var/run/mysqld/mysqld.sock' (2)
So running the installer renders a problem when installing MySQL. After
that all fails.
For what it's worth, the work I did on Debian packaging (which would be
somewhat relevant to Ubuntu) disabled MySQL initialisation because that should
be done when MySQL itself is installed and configured on Debian/Ubuntu. (I
don't know what other distributions do when installing MySQL.) Thus, one
unnecessary question is eliminated when running setup-kolab in such an
environment.

As given above, a MySQL root password is still needed to create various
databases and users, and that involves creating a temporary file so that the
MySQL login can occur. There are probably better ways of doing this, but
MySQL's documentation is frequently incoherent and inscrutable.

When setup-kolab finds that temporary file to be missing it will ask you for
the MySQL root password. In general, all this should just work, but I seem to
recall experiencing difficulties with it quite some time ago, although these
were admittedly overshadowed by other behaviour in setup-kolab.

I haven't been spending much time on Kolab recently and cannot really provide
much more insight, particularly with regard to the behaviour of the upstream
packages, but the mechanisms involved are relatively straightforward.

Paul
Franz Skale
2014-09-02 13:05:15 UTC
Permalink
Hi,
all setup python libs reside in the /usr/share/pyshared/pykolab/setup dir.
So, setup_roundcube.py e.g runs this:
schema_files = []
for root, directories, filenames in os.walk('/usr/share/doc/'):
for directory in directories:
if directory.startswith("roundcubemail"):
for root, directories, filenames in
os.walk(os.path.join(root, directory)):
for filename in filenames:
if filename.startswith('mysql.initial') and
filename.endswith('.sql'):
schema_filepath = os.path.join(root,filename)
if not schema_filepath in schema_files:
schema_files.append(schema_filepath)

break
break

So try to run the sql files in /usr/share/doc/roundcube or try to run
the setup_roundcube.py.
Or start over the whole installation by removing the kolab debs and
dependency and the purge the configs.


Rgds.

Franz
Post by Paul Boddie
Post by Rob Badub
Please supply a root password for MySQL. This password will be the
administrative
user for this MySQL server, and it should be kept a secret. After this
setup process has completed, Kolab is going to discard and forget about
this password,
but you will need it for administrative tasks in MySQL.
ERROR 2002 (HY000): Can't connect to local MySQL server through socket
'/var/run/mysqld/mysqld.sock' (2)
ERROR 2002 (HY000): Can't connect to local MySQL server through socket
'/var/run/mysqld/mysqld.sock' (2)
ERROR 2002 (HY000): Can't connect to local MySQL server through socket
'/var/run/mysqld/mysqld.sock' (2)
So running the installer renders a problem when installing MySQL. After
that all fails.
For what it's worth, the work I did on Debian packaging (which would be
somewhat relevant to Ubuntu) disabled MySQL initialisation because that should
be done when MySQL itself is installed and configured on Debian/Ubuntu. (I
don't know what other distributions do when installing MySQL.) Thus, one
unnecessary question is eliminated when running setup-kolab in such an
environment.
As given above, a MySQL root password is still needed to create various
databases and users, and that involves creating a temporary file so that the
MySQL login can occur. There are probably better ways of doing this, but
MySQL's documentation is frequently incoherent and inscrutable.
When setup-kolab finds that temporary file to be missing it will ask you for
the MySQL root password. In general, all this should just work, but I seem to
recall experiencing difficulties with it quite some time ago, although these
were admittedly overshadowed by other behaviour in setup-kolab.
I haven't been spending much time on Kolab recently and cannot really provide
much more insight, particularly with regard to the behaviour of the upstream
packages, but the mechanisms involved are relatively straightforward.
Paul
_______________________________________________
users mailing list
users at lists.kolab.org
https://lists.kolab.org/mailman/listinfo/users
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4254 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://lists.kolab.org/pipermail/users/attachments/20140902/14779293/attachment-0001.p7s>
Paul Boddie
2014-09-02 14:09:53 UTC
Permalink
Post by Franz Skale
Hi,
all setup python libs reside in the /usr/share/pyshared/pykolab/setup dir.
schema_files = []
for root, directories, filenames in
if filename.startswith('mysql.initial') and
schema_filepath = os.path.join(root,filename)
schema_files.append(schema_filepath)
break
break
I'm still not sure that this code is actually functional on Debian, but I
don't remember which bug was tracking this now. Various Roundcube resources
reside in different directories under /usr/share/doc as I recall, and there
were some things that weren't getting found and executed in code resembling
the above.
Post by Franz Skale
So try to run the sql files in /usr/share/doc/roundcube or try to run
the setup_roundcube.py.
Or start over the whole installation by removing the kolab debs and
dependency and the purge the configs.
Starting over may not help because you'll end up running the same code.
Perhaps changing the setup_roundcube.py file and running setup-kolab or the
relevant package configuration script might work. The issue of persuading the
Debian/Ubuntu packaging that everything is now configured might also be a
problem, but you could always modify the script (in /var/lib/dpkg/info/
somewhere) to exit with a suitable status: that's the hack I've used to fix
bad packages before now.

Of course, the proper solution is to fix the packaging, but we're at something
of an impasse there at the moment.

Paul
Torsten Grote
2014-09-02 14:19:09 UTC
Permalink
Post by Paul Boddie
I'm still not sure that this code is actually functional on Debian, but I
don't remember which bug was tracking this now.
This might be this issue:

https://issues.kolab.org/show_bug.cgi?id=2811

Kind Regards,
Torsten
--
Torsten Grote
Kolab.org Community Manager

e: torsten at kolab.org
w: https://Kolab.org

pgp: 0x2175A534A4F2EFA3
Juan
2014-09-03 19:43:18 UTC
Permalink
Post by Franz Skale
Hi,
setup kolab will ask you for a mysql root password on setup.
if you missed it, run setup-kolab -D 9 -l debug and show us the output.
login as root and create a file called .my.cnf
[client]
port = 3306
socket = /var/run/mysqld/mysqld.sock
password = xxxxxxxxxx
Of course, use or own mysql root password.
then do a chmod 700 .my.cnf
Rerun the setup and continue.
Rgds.
Franz
Post by Rob Badub
Hi all,
My name is Rob Badub and I'm new to Kolab. My system is a Ubuntu server
14.04 and I'm following the instructions that I've found on
http://docs.kolab.org/installation-guide/ubuntu.html
After executing the install script with
Sudo aptitude install kolab
it fails at the install for roundcubemail
E: Sub-process /usr/bin/dpkg returned an error code (1)
Setting up roundcubemail (1:1.1~dev20140404-0~kolab3) ...
ERROR: Error connecting to database: SQLSTATE[28000] [1045] Access denied
for user 'roundcube' <at> 'localhost' (using password: YES)ERROR: Site
roundcubemail does not exist!
Subsequently the following packages with dependencies fail as well.
subprocess installed post-installation script returned error exit status 1
Package roundcubemail is not configured yet.
And the same for
roundcubemail-plugins-kolab
chwala
irony
kolab-freebusy
kolab-syncroton
roundcubemail-plugin-contextmenu
roundcubemail-plugin-threadingasdefault
kolab-webclient
kolab
ERROR: Error connecting to database: SQLSTATE[28000] [1045] Access denied
for user 'roundcube' <at> 'localhost' (using password: YES)ERROR: Site
roundcubemail does not exist!
There is no user roundcube
It does not use the FQDN
Site roundcubemail does not exist (what does this mean?)
Please advice
Cheers,
Rob
_______________________________________________
users mailing list
users <at> lists.kolab.org
https://lists.kolab.org/mailman/listinfo/users
Attachment (smime.p7s): application/pkcs7-signature, 4254 bytes
_______________________________________________
users mailing list
users <at> lists.kolab.org
https://lists.kolab.org/mailman/listinfo/users
I try this and install success ok, work for me:

1. FIX TO INSTALL KOLAB 3.3 IN UBUNTU 14.04

- After error output 'aptitude install kolab' do -

vim /usr/share/roundcubemail/config/config.inc.php

replace this -> roundcube:pass at localhost/roundcubemail
for this -> root:<PASSMYSQLROOT>@localhost/roundcube

mysql -u root -p
Post by Franz Skale
create database roundcube;
cd /usr/share/doc/roundcubemail/SQL/
mysql -u root -p roundcube < mysql.initial.sql
dpkg --configure -a

cd /etc/apache2/sites-available/
ln -s kolab-webadmin kolab-webadmin.conf
ln -s roundcubemail roundcubemail.conf
dpkg --configure -a

More errors again? continue :)

ln -s chwala chwala.conf
ln -s iRony iRony.conf
ln -s kolab-freebusy kolab-freebusy.conf
ln -s kolab-syncroton kolab-syncroton.conf
dpkg --configure -a

and finally:

a2ensite kolab-webadmin.conf
service apache2 start

setup-kolab

More errors at point mysql? no matter, its ok, the process of the
installation was completed;
Juan
2014-09-03 20:01:40 UTC
Permalink
I try this and install success ok, work for me:

1. FIX TO INSTALL KOLAB 3.3 IN UBUNTU 14.04

- After error output 'aptitude install kolab' do -

vim /usr/share/roundcubemail/config/config.inc.php

replace this -> roundcube:pass <at> localhost/roundcubemail
for this -> root:<PASSMYSQLROOT> <at> localhost/roundcube

mysql -u root -p
Post by Franz Skale
create database roundcube;
cd /usr/share/doc/roundcubemail/SQL/
mysql -u root -p roundcube < mysql.initial.sql
dpkg --configure -a

cd /etc/apache2/sites-available/
ln -s kolab-webadmin kolab-webadmin.conf
ln -s roundcubemail roundcubemail.conf
dpkg --configure -a

More errors again? continue :)

ln -s chwala chwala.conf
ln -s iRony iRony.conf
ln -s kolab-freebusy kolab-freebusy.conf
ln -s kolab-syncroton kolab-syncroton.conf
dpkg --configure -a

and finally:

a2ensite kolab-webadmin.conf
service apache2 start

setup-kolab

More errors at point mysql? no matter, its ok, the process of the
installation was completed;
Post by Franz Skale
Hi all,
My name is Rob Badub and I'm new to Kolab. My system is a Ubuntu server
14.04 and I'm following the instructions that I've found on
http://docs.kolab.org/installation-guide/ubuntu.html
After executing the install script with
Sudo aptitude install kolab
it fails at the install for roundcubemail
E: Sub-process /usr/bin/dpkg returned an error code (1)
Setting up roundcubemail (1:1.1~dev20140404-0~kolab3) ...
ERROR: Error connecting to database: SQLSTATE[28000] [1045] Access denied
for user 'roundcube' <at> 'localhost' (using password: YES)ERROR: Site
roundcubemail does not exist!
Subsequently the following packages with dependencies fail as well.
subprocess installed post-installation script returned error exit status 1
Package roundcubemail is not configured yet.
And the same for
roundcubemail-plugins-kolab
chwala
irony
kolab-freebusy
kolab-syncroton
roundcubemail-plugin-contextmenu
roundcubemail-plugin-threadingasdefault
kolab-webclient
kolab
ERROR: Error connecting to database: SQLSTATE[28000] [1045] Access denied
for user 'roundcube' <at> 'localhost' (using password: YES)ERROR: Site
roundcubemail does not exist!
There is no user roundcube
It does not use the FQDN
Site roundcubemail does not exist (what does this mean?)
Please advice
Cheers,
Rob
Loading...