Database Not Working afte OS upgrade

classic Classic list List threaded Threaded
9 messages Options
rsteinmetz70112 rsteinmetz70112
Reply | Threaded
Open this post in threaded view
|

Database Not Working afte OS upgrade

I upgraded my OS from Ubuntu 14.04 LTS to 16.04 LTS.
The upgrade did not go well, but I now have egroupware 16.0 configured but cannot connect to the mysql database. It's there, I can get to it in mysql.

I need some help to see what may be wrong and how I can get it working again.
--

Robert Steinmetz AIA
Principal
Steinmetz & Associates

New Orleans & Atlanta


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
eGroupWare-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/egroupware-users

rob.vcf (318 bytes) Download Attachment
deeztek deeztek
Reply | Threaded
Open this post in threaded view
|

Re: Database Not Working afte OS upgrade

Does the egroupware user have permissions to the database? Is the password correct?



------ Original message------
From: rsteinmetz70112 [via EGroupware]
Date: Sun, Mar 19, 2017 3:38 PM
To: Deeztek Support;
Cc:
Subject:Database Not Working afte OS upgrade

I upgraded my OS from Ubuntu 14.04 LTS to 16.04 LTS.
The upgrade did not go well, but I now have egroupware 16.0 configured but cannot connect to the mysql database. It's there, I can get to it in mysql.

I need some help to see what may be wrong and how I can get it working again.
--

Robert Steinmetz AIA
Principal
Steinmetz & Associates

New Orleans & Atlanta


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
eGroupWare-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/egroupware-users

rob.vcf (318 bytes) Download Attachment



If you reply to this email, your message will be added to the discussion below:
http://egroupware.219119.n3.nabble.com/Database-Not-Working-afte-OS-upgrade-tp4015338.html
To start a new topic under egroupware-users, email ml-node+[hidden email]
To unsubscribe from egroupware-users, click here.
NAML
rsteinmetz70112 rsteinmetz70112
Reply | Threaded
Open this post in threaded view
|

Re: Database Not Working afte OS upgrade

The password is correct and is that same as it was before the upgrade. I did find an error in the MySQL logs,

User entry 'egroupware'@'localhost' has an empty plugin value. The user will be ignored and no one can login with this user anymore.
I have found that sometimes when MySQL is upgraded the tables need to be upgraded as well.

I've been looking at a utility called mysql_upgrade, which some articles on the web say will fix the problem but I can't get it to run, I get errors like these:

root@hamlet:/usr/bin# ./mysql_upgrade --host=localhost -u root -p
Enter password:
mysql_upgrade: Got error: 2002: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) while connecting to the MySQL server
Upgrade process encountered error and will not continue.

root@hamlet:/usr/bin# ./mysql_upgrade -h 127.0.0.1 -u root -p
Enter password:
mysql_upgrade: Got error: 2003: Can't connect to MySQL server on '127.0.0.1' (111) while connecting to the MySQL server
Upgrade process encountered error and will not continue.



deeztek wrote:
Does the egroupware user have permissions to the database? Is the password correct?



------ Original message------
From: rsteinmetz70112 [via EGroupware]
Date: Sun, Mar 19, 2017 3:38 PM
To: Deeztek Support;
Cc:
Subject:Database Not Working afte OS upgrade

I upgraded my OS from Ubuntu 14.04 LTS to 16.04 LTS.
The upgrade did not go well, but I now have egroupware 16.0 configured but cannot connect to the mysql database. It's there, I can get to it in mysql.

I need some help to see what may be wrong and how I can get it working again.
--

Robert Steinmetz AIA
Principal
Steinmetz & Associates

New Orleans & Atlanta



--

Robert Steinmetz AIA
Principal
Steinmetz & Associates

New Orleans & Atlanta


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
eGroupWare-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/egroupware-users

rob.vcf (318 bytes) Download Attachment
deeztek deeztek
Reply | Threaded
Open this post in threaded view
|

Re: Database Not Working afte OS upgrade

Assuming you have a db backup maybe remove and purge mysql and reinstall and the restore the db and recreate the user.  



------ Original message------
From: rsteinmetz70112 [via EGroupware]
Date: Sun, Mar 19, 2017 6:20 PM
To: Deeztek Support;
Cc:
Subject:Re: Database Not Working afte OS upgrade

The password is correct and is that same as it was before the upgrade. I did find an error in the MySQL logs,

User entry 'egroupware'@'localhost' has an empty plugin value. The user will be ignored and no one can login with this user anymore.
I have found that sometimes when MySQL is upgraded the tables need to be upgraded as well.

I've been looking at a utility called mysql_upgrade, which some articles on the web say will fix the problem but I can't get it to run, I get errors like these:

root@hamlet:/usr/bin# ./mysql_upgrade --host=localhost -u root -p
Enter password:
mysql_upgrade: Got error: 2002: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) while connecting to the MySQL server
Upgrade process encountered error and will not continue.

root@hamlet:/usr/bin# ./mysql_upgrade -h 127.0.0.1 -u root -p
Enter password:
mysql_upgrade: Got error: 2003: Can't connect to MySQL server on '127.0.0.1' (111) while connecting to the MySQL server
Upgrade process encountered error and will not continue.



deeztek wrote:
Does the egroupware user have permissions to the database? Is the password correct?



------ Original message------
From: rsteinmetz70112 [via EGroupware]
Date: Sun, Mar 19, 2017 3:38 PM
To: Deeztek Support;
Cc:
Subject:Database Not Working afte OS upgrade

I upgraded my OS from Ubuntu 14.04 LTS to 16.04 LTS.
The upgrade did not go well, but I now have egroupware 16.0 configured but cannot connect to the mysql database. It's there, I can get to it in mysql.

I need some help to see what may be wrong and how I can get it working again.
--

Robert Steinmetz AIA
Principal
Steinmetz & Associates

New Orleans & Atlanta



--

Robert Steinmetz AIA
Principal
Steinmetz & Associates

New Orleans & Atlanta


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
eGroupWare-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/egroupware-users

rob.vcf (318 bytes) Download Attachment



If you reply to this email, your message will be added to the discussion below:
http://egroupware.219119.n3.nabble.com/Database-Not-Working-afte-OS-upgrade-tp4015338p4015341.html
To start a new topic under egroupware-users, email ml-node+[hidden email]
To unsubscribe from egroupware-users, click here.
NAML
rsteinmetz70112 rsteinmetz70112
Reply | Threaded
Open this post in threaded view
|

Re: Database Not Working afte OS upgrade

In reply to this post by deeztek
OK, I got it to work:

Here is the recipe:

# make the directory for the socket (if it isn't already there)
mkdir /var/run/mysqld
# Change the owner
chown mysql:mysql mysqld
# Identify the path to mysqld_safe 
ps -e | grep mysqld
# Stop mysql
sudo service mysql stop
# Start with --skip-grant-tables
sudo /usr/bin/mysqld_safe --skip-grant-tables
# Run mysql_upgrade
sudo mysql_upgrade -h 127.0.0.1 -u root -p
# Restart mysql
sudo service mysql restart
Everything seems to be working now.


deeztek wrote:
Does the egroupware user have permissions to the database? Is the password correct?



------ Original message------
From: rsteinmetz70112 [via EGroupware]
Date: Sun, Mar 19, 2017 3:38 PM
To: Deeztek Support;
Cc:
Subject:Database Not Working afte OS upgrade

I upgraded my OS from Ubuntu 14.04 LTS to 16.04 LTS.
The upgrade did not go well, but I now have egroupware 16.0 configured but cannot connect to the mysql database. It's there, I can get to it in mysql.

I need some help to see what may be wrong and how I can get it working again.
--

Robert Steinmetz AIA
Principal
Steinmetz & Associates

New Orleans & Atlanta


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
eGroupWare-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/egroupware-users

rob.vcf (318 bytes) Download Attachment



If you reply to this email, your message will be added to the discussion below:
http://egroupware.219119.n3.nabble.com/Database-Not-Working-afte-OS-upgrade-tp4015338.html
To start a new topic under egroupware-users, email ml-node+[hidden email]
To unsubscribe from egroupware-users, click here.
NAML


View this message in context: Re: Database Not Working afte OS upgrade
Sent from the egroupware-users mailing list archive at Nabble.com.


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot


_______________________________________________
eGroupWare-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/egroupware-users


--

Robert Steinmetz AIA
Principal
Steinmetz & Associates

New Orleans & Atlanta


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
eGroupWare-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/egroupware-users

rob.vcf (318 bytes) Download Attachment
rsteinmetz70112 rsteinmetz70112
Reply | Threaded
Open this post in threaded view
|

Re: Database Not Working afte OS upgrade

Well it stopped working again

Accessing eGroupware I get this error:

Database error

Connection with ADOdb::PConnect(localhost:3306, egroupware, $Password, egroupware) failed.

Maybe you not created a database for EGroupware yet.

Looking in the mysql error.log I see:

2017-03-20T14:30:39.132484Z 0 [Warning] User entry 'egroupware'@'localhost' has an empty plugin value. The user will be
ignored and no one can login with this user anymore.
and then this repeated many time

2017-03-20T14:30:44.110271Z 111 [Note] Access denied for user 'egroupware'@'localhost' (using password: YES)
If I try to access the mysql database by the command line I get this:

root@hamlet:/var/log/mysql# mysql -u egroupware -p
Enter password:
ERROR 1045 (28000): Access denied for user 'egroupware'@'localhost' (using password: YES)

Anyone have any ideas?



Robert Steinmetz AIA wrote:
OK, I got it to work:

Here is the recipe:

# make the directory for the socket (if it isn't already there)
mkdir /var/run/mysqld
# Change the owner
chown mysql:mysql mysqld
# Identify the path to mysqld_safe 
ps -e | grep mysqld
# Stop mysql
sudo service mysql stop
# Start with --skip-grant-tables
sudo /usr/bin/mysqld_safe --skip-grant-tables
# Run mysql_upgrade
sudo mysql_upgrade -h 127.0.0.1 -u root -p
# Restart mysql
sudo service mysql restart
Everything seems to be working now.


deeztek wrote:
Does the egroupware user have permissions to the database? Is the password correct?



------ Original message------
From: rsteinmetz70112 [via EGroupware]
Date: Sun, Mar 19, 2017 3:38 PM
To: Deeztek Support;
Cc:
Subject:Database Not Working afte OS upgrade

I upgraded my OS from Ubuntu 14.04 LTS to 16.04 LTS.
The upgrade did not go well, but I now have egroupware 16.0 configured but cannot connect to the mysql database. It's there, I can get to it in mysql.

I need some help to see what may be wrong and how I can get it working again.
--


--

Robert Steinmetz AIA
Principal
Steinmetz & Associates

New Orleans & Atlanta


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
eGroupWare-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/egroupware-users

rob.vcf (318 bytes) Download Attachment
hnategh hnategh
Reply | Threaded
Open this post in threaded view
|

Re: Database Not Working afte OS upgrade

Hi Robert,

It looks like your egroupware@localhost  db user has not enough privilege to access to database egroupware. You can  run the following in command line to see what are the privileges set for the egroupware@localhost and try to give Grant All maybe.

> mysql -u root -p

mysql> SHOW GRANTS FOR 'egroupware'@'localhost';

mysql> GRANT ALL ON *.* TO 'egroupware'@'localhost' WITH GRANT OPTION;

mysql> FLUSH PRIVILEGES;

** Note: connect to mysql with a user which has GRANT PRIVILEGES, like root

Hope this helps.



Best regards,

Hadi Nategh
Software Developer

EGroupware GmbH [www.egroupware.org]
Handelsregister HRB Kaiserslautern 3587
Geschäftsführer Birgit und Ralf Becker
Leibnizstr. 17, 67663 Kaiserslautern, Germany
Telefon +49 631 31657-0 e
rsteinmetz70112 rsteinmetz70112
Reply | Threaded
Open this post in threaded view
|

Re: Database Not Working afte OS upgrade

THanks,

I think there is definitely something wrong with the user. But I'm getting some odd errors
mysql> SELECT host, user FROM mysql.user ;
+-----------+------------------+
| host      | user                           |
+-----------+------------------+
| hamlet    | root                         |
| localhost | debian-sys-maint     |
| localhost | egroupware             |
| localhost | mysql.sys                 |
| localhost | root                         |
+-----------+------------------+
5 rows in set (0.00 sec)


mysql> SHOW GRANTS FOR 'egroupware'@'localhost';
ERROR 1141 (42000): There is no such grant defined for user 'egroupware' on host 'localhost'

mysql> GRANT ALL ON *.* TO 'egroupware'@'localhost' WITH GRANT OPTION;
ERROR 1133 (42000): Can't find any matching row in the user table


hnategh wrote:
Hi Robert,

It looks like your egroupware@localhost  db user has not enough privilege to
access to database egroupware. You can  run the following in command line to
see what are the privileges set for the egroupware@localhost and try to give
Grant All maybe.

mysql -u root -p
mysql> SHOW GRANTS FOR 'egroupware'@'localhost';

mysql> GRANT ALL ON *.* TO 'egroupware'@'localhost' WITH GRANT OPTION;

mysql> FLUSH PRIVILEGES;

** Note: connect to mysql with a user which has GRANT PRIVILEGES, like root

Hope this helps.



Best regards,







--

Robert Steinmetz AIA
Principal
Steinmetz & Associates

New Orleans & Atlanta


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
eGroupWare-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/egroupware-users

rob.vcf (318 bytes) Download Attachment
rsteinmetz70112 rsteinmetz70112
Reply | Threaded
Open this post in threaded view
|

Re: Database Not Working afte OS upgrade

Thanks to everyone who helped.

I was able to get it fixed.

I CREATEed a new USER switched the Egroupware to that user then I was able to DROP the 'egroupware' USER and Create a NEW one. I was then able to GRANT PRIVILEGES to the "new" 'egroupware'.

Somehow the "old" 'egroupware' was not recognized by any of the commands except DROP.  Possibly a result of the upgrade to mysql 5.7 in Ubuntu 16.04 of a glitch in the update process.

--

Robert Steinmetz AIA
Principal
Steinmetz & Associates

New Orleans & Atlanta


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
eGroupWare-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/egroupware-users

rob.vcf (318 bytes) Download Attachment