Installation of Nextcloud 12 fails

Hi,
Debian 9.2 + Nextcloud 12.0.3
I followed the instructions for Manual Installation. All prerequisites were fulfilled successfully.

Installation doesn’t continue at step: Installation wizard
I tried both

  1. installation with occ
  2. via wizard by connecting to localhost/nextcloud

Error messages for 1:
sudo -u www-data php occ maintenance:install --database “mysql” --database-name “nextcloud” --database-host “localhost” --database-user root --database-pass “xxxxxx” --admin-user “admin” --admin-pass "xxxxxx"
Nextcloud is not installed - only a limited number of commands are available
Error while trying to create admin user: Failed to connect to the database: An exception occured in driver: SQLSTATE[HY000] [1698] Access denied for user ‘root’@‘localhost’

Maria-DB is in fresh state, except I have set a password for root.

sudo -u www-data php occ status
Nextcloud is not installed - only a limited number of commands are available

  • installed: false
  • version: 12.0.3.3
  • versionstring: 12.0.3
  • edition:

Output of 2.

  • @author Lukas Reschke * @author Morris Jobke * @author Robin Appelman * @author Thomas Müller * @author Vincent Petry * * @license AGPL-3.0 * * This code is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License, version 3, * as published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License, version 3, * along with this program. If not, see * */ // Show warning if a PHP version below 5.6.0 is used, this has to happen here // because base.php will already use 5.6 syntax. if (version_compare(PHP_VERSION, ‘5.6.0’) === -1) { echo ‘This version of Nextcloud requires at least PHP 5.6.0
    ’; echo 'You are currently running ’ . PHP_VERSION . ‘. Please update your PHP version.’; return; } // Show warning if PHP 7.2 is used as Nextcloud is not compatible with PHP 7.2 for now // @see https://github.com/nextcloud/server/pull/5791 if (version_compare(PHP_VERSION, ‘7.2.0’) !== -1) { echo ‘This version of Nextcloud is not compatible with PHP 7.2.
    ’; echo 'You are currently running ’ . PHP_VERSION . ‘.’; return; } try { require_once DIR . ‘/lib/base.php’; OC::handleRequest(); } catch(\OC\ServiceUnavailableException $ex) { \OC::$server->getLogger()->logException($ex, array(‘app’ => ‘index’)); //show the user a detailed error page OC_Response::setStatus(OC_Response::STATUS_SERVICE_UNAVAILABLE); OC_Template::printExceptionErrorPage($ex); } catch (\OC\HintException $ex) { OC_Response::setStatus(OC_Response::STATUS_SERVICE_UNAVAILABLE); OC_Template::printErrorPage($ex->getMessage(), $ex->getHint()); } catch (\OC\User\LoginException $ex) { OC_Response::setStatus(OC_Response::STATUS_FORBIDDEN); OC_Template::printErrorPage($ex->getMessage(), $ex->getMessage()); } catch (Exception $ex) { \OC::$server->getLogger()->logException($ex, array(‘app’ => ‘index’)); //show the user a detailed error page OC_Response::setStatus(OC_Response::STATUS_INTERNAL_SERVER_ERROR); OC_Template::printExceptionErrorPage($ex); } catch (Error $ex) { \OC::$server->getLogger()->logException($ex, array(‘app’ => ‘index’)); OC_Response::setStatus(OC_Response::STATUS_INTERNAL_SERVER_ERROR); OC_Template::printExceptionErrorPage($ex); }

Web-Interface generally works when I connect to localhost (shows Apache2 Debian Default Page)

Thanks,
Guenni

When you wrote —database « mysql »
It’s not the type of database like mysql or postgresql or sqlite.
It’s the name of the database you wanna use for your nextcloud.
Try with nextcloud as database name.

with a web browser you don’t have to see apache default page. You should see nextcloud install page. You should look on google : nextcloud 12 install tuto.
You misconfigured your apache vhost for nextcloud

Are you sure @Nemskiller ? I am not.

@Guenni: i guess you didnt configure your DB credentials right. root@% and similar are not the same as root@localhost somehow. Not an sql expert myself, but fell over the same issue.

how about:

GRANT ALL PRIVILEGES ON putdbnamehere.* TO ‘root’@‘localhost’ IDENTIFIED BY ‘putpasswordhere’;

in mysql of course.

edit: putdbnamehere must be in the style of quotes which this forum uses for preformatted text. I dont know yet how to escape them on this forum. ( help :confused: )

I have now purged the installation of mariadb-server and apache2 and re-installed both
The installation of apache2 comes with an enabled default page on var/www/html. This part works.
I then followed again the tutorial on https://docs.nextcloud.com/server/12/admin_manual/installation/source_installation.html (enabling modules, creating nextcloud.conf, permission changes …)
used graphical Installation Wizard but ended up with the same result (mangled page http://ip/nextcloud).

Are there any further changes necessary (php …)
I have installed PHP 7.0.19-1 (cli) (built: May 11 2017 14:04:47) ( NTS )

apache error- and accesslog don’t give hints.
nextcloud logs are empty

Can you tell us what did you write in your installation wizard ?

Username ->
Password -> (don’t write your password)

Folder for data ->

Mysql server adress ->
Login ->
Password -> don’t write your password
Port ->

Then you click proceed and what happen next ?

Instead of getting the blue configure screen I saw the mangled output thus I wasn’t able to enter anything.
That’s so weird. I remember my first nextcloud 10 installation where everything went so smooth…

I never installed via occ, so i dont know how that feels. But the occ output suggests that my first solution should apply since “Access denied for user ‘root’@‘localhost’” but then you should at least see the blue install screen. Interesting

When i encountered the same error seen in the browser, i stopped trying php7 and went back to php5.6

Maybe i was mislead by the fact, that the mangled output contains a lot of possible error messages.

I just tried my luck on a Debian 8 with php 5.6.30. And I got my Wizard. Everything went as described.
So there should be any bug in any of the components e.g. php7. I will now upgrade to php7 and try again.

This is the packages i have for my configuration :
php7.0
php7.0-mbstring
php7.0-curl
php7.0-zip
php7.0-gd
php7.0-mysql
php7.0-xml
libapache2-mod-php7.0

Try with them.

That’s what I have installed:
libapache2-mod-php7.0
php7.0
php7.0-cli
php7.0-common
php7.0-curl
php7.0-gd
php7.0-intl
php7.0-json
php7.0-mbstring
php7.0-mcrypt
php7.0-mysql
php7.0-opcache
php7.0-readline
php7.0-xml
php7.0-zip

php -v gives 7.0.19-1

If you follow this guide https://help.nextcloud.com/t/complete-nc-installation-on-debian-9-stretch-and-manual-update/ you should have a complete working installation on debian 9.

About occ installation on mariadb: MariaDB comes with unix_socket login plugin for root user enabled by default. Thus root user can login without password, but any other user can’t. This leads to the access denied error, if www-data tries to use mysql root user, even with password.

You would need to disable the unix_socket plugin first manually and set a password, or create user+pw for nc manually and use web ui installation wizard.

I’ve found the cause. Apache and php did not interact properly. After purging the installations, making sure every snippet has gone and re-installation it is now working.

Thanks to all for your tips.

You can now put this topic as Solved please. It’s important to notice in the title that this has been resolved