Zentyal Forum, Linux Small Business Server
Zentyal Server => Installation and Upgrades => Topic started by: robb on September 17, 2013, 01:31:23 pm
-
With the last update of Samba I received the following error message:
Zentyal components
The following packages are not properly installed. You need to fix this before trying to use them or install new modules.
Component Description Version
zentyal-samba Zentyal - File Sharing and Domain Services 3.1.12
To solve this situation, please try to execute the following command in the console:
sudo dpkg --configure -a
After the above command is finished you can reload this page. If the problem persists, you can ask for help in the community forum or file a ticket in the Zentyal trac.
It looks like the mysqlaccount 'zentyal' can't connect to the database. At least, that is what I understand from this errormessage. I did change the zentyal-mysql.passwd file in /var/lib/zentyal/conf because I had to import a .sql dump file that used other credentials. However, I set the .passwd back to it's original value and still zentyal can't connect to mysql.
Errormessage when performing sudo dpkg --configure -a:
/var/lib/zentyal/conf$ sudo dpkg --configure -a
Setting up zentyal-samba (3.1.12) ...
DBI connect('zentyal','zentyal',...) failed: Access denied for user 'zentyal'@'localhost' (using password: YES) at /usr/share/perl5/EBox/MyDBEngine.pm line 122
(in cleanup) There wasn't a database connection, check if database exists\n at /usr/share/perl/5.14/Carp.pm line 79.
dpkg: error processing zentyal-samba (--configure):
subprocess installed post-installation script returned error exit status 255
Errors were encountered while processing:
zentyal-samba
Could it be that a new connection has to be created? If so, how? (i am an absolute n00b when it comes to mysql)
Any hints and tips how to solve this?
btw, I have phpmyadmin installed so I can do this through the phpmyadmin webpage or through mysql console.
/edit
I checked what privileges are set on the zentyal database.
In mysql console I queried: select * from SCHEMA_PRIVILEGES where TABLE_SCHEMA='zentyal';
reply was:
mysql> select * from SCHEMA_PRIVILEGES where TABLE_SCHEMA='zentyal';
+-----------------------+---------------+--------------+-------------------------+--------------+
| GRANTEE | TABLE_CATALOG | TABLE_SCHEMA | PRIVILEGE_TYPE | IS_GRANTABLE |
+-----------------------+---------------+--------------+-------------------------+--------------+
| 'zentyal'@'localhost' | def | zentyal | SELECT | NO |
| 'zentyal'@'localhost' | def | zentyal | INSERT | NO |
| 'zentyal'@'localhost' | def | zentyal | UPDATE | NO |
| 'zentyal'@'localhost' | def | zentyal | DELETE | NO |
| 'zentyal'@'localhost' | def | zentyal | CREATE | NO |
| 'zentyal'@'localhost' | def | zentyal | DROP | NO |
| 'zentyal'@'localhost' | def | zentyal | REFERENCES | NO |
| 'zentyal'@'localhost' | def | zentyal | INDEX | NO |
| 'zentyal'@'localhost' | def | zentyal | ALTER | NO |
| 'zentyal'@'localhost' | def | zentyal | CREATE TEMPORARY TABLES | NO |
| 'zentyal'@'localhost' | def | zentyal | LOCK TABLES | NO |
| 'zentyal'@'localhost' | def | zentyal | EXECUTE | NO |
| 'zentyal'@'localhost' | def | zentyal | CREATE VIEW | NO |
| 'zentyal'@'localhost' | def | zentyal | SHOW VIEW | NO |
| 'zentyal'@'localhost' | def | zentyal | CREATE ROUTINE | NO |
| 'zentyal'@'localhost' | def | zentyal | ALTER ROUTINE | NO |
| 'zentyal'@'localhost' | def | zentyal | EVENT | NO |
| 'zentyal'@'localhost' | def | zentyal | TRIGGER | NO |
+-----------------------+---------------+--------------+-------------------------+--------------+
So it looks like mysql user 'zentyal' has rights on the zentyal database??? So what is going wrong here? Or do I look at the wrong user or database?
-
anyone?
-
password misalignment ? did you try to change it, both sides ?
-
I tried to change the password.
As said, I am VERY unfamiliar with mysql but I probably can get the commands used back:
I set the password for mysqluser zentyal as follows:
SET PASSWORD FOR 'zentyal'@'localhost' = PASSWORD('<password>');
Then to be sure, grant the privileges for mysql user zentyal all on db zentyal:
grant all privileges on zentyal.* to zentyal@localhost identified by '<password>';
Am I doing something wrong with the syntax or something else?
-
Hi Robb and Christian,
Zentyal code looks for the password on /var/lib/zentyal/conf/zentyal-mysql.passwd. So if you reset the zentyal user password in MySQL; make sure this file contains the same password.
The way to test this:
$ mysql -uzentyal -p<pass> zentyal
Best,
-
sixtone, thnx for the answer. I knew this and I did check if the password matches the string in zentyal-mysql.passwd
When I perform that command, and use the string that is used in zentyal-mysql.passwd, I do get logged into the mysql console, so that looks like ok.
That's why I am a bit puzzled why I get this message that there is no database connection.
Can it be some privileges problem? However, I DID grant mysqluser zentyal all on zentyal.* databases... or should that just be zentyal?