Nextcloud version : 12.0.4
Operating system : Ubuntu 16.04.3 LTS
Apache : 2.4.18
PHP version : 7.0.22
The issue you are facing:
Everyday at 06:25 am i get a mail telling mysqladmin: connect to server at ‘localhost’ failed
See content at the end of my posting
First of all i am new to Nextcloud and using ubuntu in general. I used the official documentation to set things up.
I did some investigation and found out that usually the user debian-sys-maint should be the user for this job, but somehow in my case it’s root.
this is my debian.cnf
Mailcontent:
cat /etc/mysql/debian.cnf
# Automatically generated for Debian scripts. DO NOT TOUCH!
[client]
host = localhost
user = root
password =
socket = /var/run/mysqld/mysqld.sock
[mysql_upgrade]
host = localhost
user = root
password =
socket = /var/run/mysqld/mysqld.sock
basedir = /usr
There is no password in the .cnf
i tried to set the password for mysql root but i still get the mails every morning.
How can i fix this as i dont think these errors should appear in my system?
I did not upgrade from another System, this was a fresh install.
Is this the first time you’ve seen this error?:
Every day Mail since i set up Nextcloud
Steps to replicate it:
- Wait one day
- Get new Mail
The output of your Nextcloud log in Admin > Logging:
No Error logs for the time 6:25 when i receive the mails
The output of your config.php file in /path/to/nextcloud
(make sure you remove any identifiable information!):
$CONFIG = array (
'instanceid' => ,
'passwordsalt' => '',
'secret' => '',
'trusted_domains' =>
array (
0 => '',
),
'datadirectory' => '',
'overwrite.cli.url' => '',
'dbtype' => 'mysql',
'version' => '12.0.4.3',
'dbname' => '',
'dbhost' => 'localhost',
'dbport' => '',
'dbtableprefix' => 'oc_',
'dbuser' => '',
'dbpassword' => '',
'installed' => true,
'mail_smtpmode' => '',
'mail_smtpauthtype' => '',
'mail_from_address' => '',
'mail_domain' => '',
'memcache.local' => '\\OC\\Memcache\\APCu',
'maintenance' => false,
'loglevel' => 0,
'mail_smtpauth' => ,
'mail_smtphost' => '',
'mail_smtpport' => '',
'mail_smtpname' => '',
'mail_smtppassword' => '',
'mail_smtpsecure' => '',
);
Mailcontent:
Return-Path: <root@cloud>
X-Original-To: root
Delivered-To: root@cloud
Received: by cloud (Postfix, from userid 0)
id 447857F9B5; Thu, 11 Jan 2018 06:25:11 +0100 (CET)
From: root@cloud (Cron Daemon)
To: root@cloud
Subject: Cron <root@cloud> test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily )
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Cron-Env: <SHELL=/bin/sh>
X-Cron-Env: <PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin>
X-Cron-Env: <HOME=/root>
X-Cron-Env: <LOGNAME=root>
Message-Id: <20180111052511.447857F9B5@cloud>
Date: Thu, 11 Jan 2018 06:25:11 +0100 (CET)
X-IMAPbase: 1515660686 12
Status: O
X-UID: 6
/etc/cron.daily/logrotate:
mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user 'root'@'localhost' (using password: NO)'
error: error running shared postrotate script for '/var/log/mysql/mysql.log /var/log/mysql/mysql-slow.log /var/log/mysql/mariadb-slow.log /var/log/mysql/error.log '
run-parts: /etc/cron.daily/logrotate exited with return code 1