Installation of OwnCloud 9 on CentOS issues with Wizard

Ask all your questions regarding OC 9.0 Please read the Support Forum Rules
Forum rules
The forums were migrated over to https://central.owncloud.org which is based on the forum software Discourse. The forums here is put into read-only mode starting from today.

More background information about this move and the reasoning behind it is available in this blogpost:

https://daniel.molkentin.net/2016/07/20 ... d-central/
tyrotaylor
Newbie
Posts: 4
Joined: Thu May 19, 2016 10:28 pm
ownCloud version: 9.0.1
Webserver: Apache
Database: MySQL
OS: Linux Hosting Package
PHP version: 5.5.35

Installation of OwnCloud 9 on CentOS issues with Wizard

Postby tyrotaylor » Thu May 19, 2016 11:36 pm

Please help us by providing the following info. Before posting please also check the pinned "Known issues" thread.

Steps to reproduce
OwnCloud 9 - Installation Problem

Trying to install OwnCloud 9 to my server (Virtual Server for a large ISP) and encounter a number of problems.

I am the root users of a CentOS server with PHP Apache and MySQL - all installed and working.

All the OwnCloud dependancies in PHP and other OS are satisfied: (sqlite php-dom php-mbstring php-gd php-pdo php-json php-xml php-zip php-gd curl php-curl php-mcrypt)

Via the MySQL CLI I have created a new database instance (OWNCLOUD_DB) and a new database user (OWNCLOUD_USER). OWNCLOUD_USER has all GRANTS. I can connect to the database with this user.

I have downloaded the CentOS OwnCloud installation package (owncloud-files). I used the following commands:

$ rpm --import https://download.owncloud.org/download/ ... md.xml.key

$ wget http://download.owncloud.org/download/r ... table.repo -O /etc/yum.repos.d/ce:stable.repo

$ yum clean expire-cache
$ yum install owncloud-files
These command complete successfully - The directory with the installation files was created here: /var/www/html/owncloud
The problem is my htdocs folder is located here: /home/user_name/public-html

To solve this issue I copied the owncloud installation directory to here: /home/user_name/public-html/owncloud

I modified the user attributes with: $ chown -R user_name.username owncloud

I was then able to start a browser and load URL http://www.mydomain.com/owncloud/index.php and start the installation wizard.

I enter the necessary information:
Username: <Admin User Name>
Password: <Strong Password>
Data folder: Not the default location (located here: /home/user_name/ownclouddata)
MySQL/MariaDB
Database User: OWNCLOUD_USER
Database Passwood : xxxxxxxx
Database Name: OWNCLOUD_DB
LOCALHOST

When I click on Finish to start the wizard. I get the following error:

Error while trying to create admin user; Failed to connect to the database: An exception occurred in the driver: SQLSTATE[HY000][1045] Access Denied for ‘OWNCLOUD_USER’@‘localhost' (using password:YES)

I have tested the database user from the MySQL CLI and it can connect, CREATE tables, INSERT data, DROP tables…..

I am not sure why the installation is not working.

Expected behaviour
Wizard is able to complete running

Actual behaviour
Wizard terminates with error: Error while trying to create admin user; Failed to connect to the database: An exception occurred in the driver: SQLSTATE[HY000][1045] Access Denied for ‘OWNCLOUD_USER’@‘localhost' (using password:YES)

Server configuration
Operating system: CentOS 6
Web server: Apache
Database: MySQL
PHP version: 5.5
ownCloud version (see ownCloud admin page): 9
Updated from an older ownCloud or fresh install: Fresh Install
ownCloud log (data/owncloud.log): Here is a log from another time I ran the wizard. Look like the wizrd tried to chnage the user name???
{"reqId":"VzpbvWiYbpkAAD8UHd8AAABM","remoteAddr":"xx.xxx.xxx.xxx","app":"mysql.s
etup","message":"Database creation failed: An exception occurred while executing
'GRANT ALL PRIVILEGES ON `OWNCLOUD_DB` . * TO 'oc_OwnCloudAdmi1'':\n\nSQLS
TATE[42000]: Syntax error or access violation: 1044 Access denied for user 'OWNCLOUD_USER'@'localhost' to database 'OWNCLOUD_DB'","level":3,"time":"2016-05-
16T23:46:05+00:00","method":"POST","url":"\/owncloud\/index.php","user":"--"}


Special configuration (external storage, external authentication, reverse proxy, server-side-encryption):No thing Special

tflidd
Forum Moderator
Posts: 7159
Joined: Sat Dec 07, 2013 7:27 pm
ownCloud version: 8.2.3
Webserver: Apache
Database: MySQL
OS: Linux

Re: Installation of OwnCloud 9 on CentOS issues with Wizard

Postby tflidd » Fri May 20, 2016 12:07 am

If you give the root password of the database, owncloud will create its own database and database user. If you give a specific username, these operations will create some errors in the logfiles (database-creation failed, ...) that can be ignored. Didn't you grant enough privileges to the user (you can just try and give the root login and let owncloud handle the user creation).

If there is still a problem, there has been a problem with socket connections in some cases that you need to specify the mysql socket (https://github.com/owncloud/core/issues/23744). I don't know the default for CentOS, but you should find it in your mysql-configuration (/etc/mysql/my.cnf).

On CentOS, keep an eye on SELinux, you need to adapt the settings to make it work with owncloud: https://doc.owncloud.org/server/9.0/adm ... ht=selinux

tyrotaylor
Newbie
Posts: 4
Joined: Thu May 19, 2016 10:28 pm
ownCloud version: 9.0.1
Webserver: Apache
Database: MySQL
OS: Linux Hosting Package
PHP version: 5.5.35

Re: Installation of OwnCloud 9 on CentOS issues with Wizard

Postby tyrotaylor » Sun May 22, 2016 2:35 pm

Good Advice.

I have asked my ISP/Hoster to run the wizard as the MySQL root user and it install correctly!

Thanks for the help


  • Similar Topics
    Replies
    Views
    Last post

Return to “ownCloud Server 9.0”

Who is online

Users browsing this forum: sosed213 and 2 guests