SQL-error when installing owncloud on centos 7

Steps to reproduce

  1. Installed and configured prerequestings like mysql, php, ssl
  2. Downloaded owncloud tar.bz2
  3. Unpacked to already running http with configured virtual host and domain
  4. Run occ maintenance:install + params like database, admin, data dir like installation instructions

Expected behaviour

Installing owncloud ce on my httpd

Actual behaviour

Error message: Error while trying to create admin user: Failed to connect to the database: An exception occurred in driver: SQLSTATE[HY000] [2054] The server requested authentication method unknown to the client

Server configuration

Operating system: CentOS 7.7

Web server: Apache/httpd

Database: MySQL 8

PHP version: PHP 7.2

ownCloud version: (see ownCloud admin page) 10.4.1

Where did you install ownCloud from: Still trying, not working tho

Insert your ownCloud log here
No log created

How can I install owncloud when the virtual host + folder-structure is already existing.

I guess by default MySQL on CentOS wants you to use the file socket to connect.
However ownCloud usually uses a TCP network socket. Make sure that is allowed in your MySQL configuration and also double check your SELinux status, especially that your web server is allowed to connect with MySQL.

1 Like

I’ve tries, but still not working. Same error…but thanks for the help

Can you run mysql on the command line, by connecting to it over the IP your MySQL service is binding to. It should look something like this

mysql <owncloud-db> -h <localhost IP, e.g: 127.0.0.1> -u <owncloud-db-user> -p <owncloud-db-user-password>

You should be able to get all those parameters from your config.php.

1 Like

Worked just fine; I was able to get in from bash with the username, password, host (localhost) and database as parameters. But still not possible to install owncloud

If you chuck this into the search engine of your choice you get heaps of valid replies to this error message:


1 Like

This worked, thanks a lot.

2 Likes