After system reboot - SQLSTATE Host is not allowed to connect to this MariaDBserver

Steps to reproduce

  1. Reboot CentOS 8 VM

Expected behaviour

The login screen should be displayed

Actual behaviour

Error-Message:
Exception occurred while logging exception: Failed to connect to the database: An exception occured in driver: SQLSTATE[HY000][1130] Host ‘FQDN of Host’ is not allowed to connect to this MariaDB server.

Server configuration

Operating system: CentOS 8

Web server: Apache/2.4.37 (centos)

Database: 10.3.11-MariaDB

PHP version: PHP 7.2.11

ownCloud version: 10.3.1.1

Updated from an older ownCloud or fresh install: fresh install

Where did you install ownCloud from: http://download.owncloud.org/download/repositories/production/CentOS_8/ce:stable.repo

Signing status (ownCloud 9.0 and above):

Login as admin user into your ownCloud and access 
http://example.com/index.php/settings/integrity/failed 
paste the results into https://gist.github.com/ and puth the link here.

**No errors have been found.**

Are you using encryption: no

Are you using an external user-backend, if yes which one: LDAP


### Client configuration
**Browser:** Chrome

**Operating system:** Windows 10

When i restart MariaDB it’s working fine. (systemctl restart mariadb)

This points to a problem with the system or the mariadb setup.
Before restarting mariadb, can you access the db via the cli?

mysql owncloud -h localhost -u dbuser -p

This will prompt you for the password. Use the credentials from your config.php.
As host you could also try the FQDN of your host instead of localhost.

What is the dbhost in your config.php?

Can you try to reproduce the error with temporarily disabled SELinux?

Perhaps your mariadb is starting before the network is ready, so it can’t bind to the IP address, and that’s why it starts working after a restart of the service?

Hello eneubauer,

the solution was, that mariadb is starting befor the network is ready.

Thank you.

kr

2 Likes