Fresh Install: mysql exception while executing 'INSERT `oc_users` ...

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/
usonianhorizon
Newbie
Posts: 6
Joined: Wed Apr 27, 2016 12:00 am
ownCloud version: 9.0.1
Webserver: Apache
Database: MySQL
OS: Linux
PHP version: 5

Fresh Install: mysql exception while executing 'INSERT `oc_users` ...

Postby usonianhorizon » Wed Apr 27, 2016 12:23 am

I am attempting a fresh install of owncloud, and am facing the exact same error as was posted here: https://forum.owncloud.org/viewtopic.php?t=29576 under 8.x. However, I don't know how/if the OP resolved the problem.

I have tried this both from web interface as well as occ, with identical results (not that I expected that they would be different).

Any guidance would be much appreciated.

Thanks.

Steps to reproduce
1.

Code: Select all

chown -R www-data:www-data /var/www/owncloud/

2.

Code: Select all

cd /var/www/owncloud

2.

Code: Select all

$ sudo -u www-data php occ  maintenance:install --database "mysql" --database-name "owncloud"  --database-user "root" --database-pass 'db_pass' --admin-user "admin" --admin-pass "admin_pass"


Expected behaviour
Install to completion

Actual behaviour

Code: Select all

An exception occurred while executing 'INSERT INTO `oc_users` ( `uid`, `password` ) VALUES( ?, ? )' with params ["admin", "1|$2y$10$4Zd5edQ42Gpu6\/O00bJ46.4bh\/wBebG5pHpY\/TKQvO25aX6kTd4QW"]:

SQLSTATE[HY000]: General error: 1665 Cannot execute statement: impossible to write to binary log since BINLOG_FORMAT = STATEMENT and at least one table uses a storage engine limited to row-based logging. InnoDB is limited to row-logging when transaction isolation level is READ COMMITTED or READ UNCOMMITTED.


Server configuration
Operating system: Ubuntu 14.04LTS
Web server: apache2
Database: mariadb
PHP version: php5
ownCloud version (see ownCloud admin page): 9.0
Updated from an older ownCloud or fresh install: fresh install
ownCloud log (data/owncloud.log):

usonianhorizon
Newbie
Posts: 6
Joined: Wed Apr 27, 2016 12:00 am
ownCloud version: 9.0.1
Webserver: Apache
Database: MySQL
OS: Linux
PHP version: 5

Re: Fresh Install: mysql exception while executing 'INSERT `oc_users` ...

Postby usonianhorizon » Wed Apr 27, 2016 1:51 am

One other data point. From MariaDB CLI, I get a consistent error if I attempt the SQL:

Code: Select all

MariaDB [owncloud]> insert into 'oc_users' ( 'uid', 'password') values ( ?, ?) with params ["admin", "1|$2y$10$marLFxzMq3PzM15G0Ijf0OXNdH3\/vbQXaq24\/rnAqUiIWM9wk7NTK"];
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ''oc_users' ( 'uid', 'password') values ( ?, ?) with params ["admin", "1|$2y$10$marLFxzMq3PzM15G0Ijf0OXNdH3\/vbQXaq24\/rnAqUiIWM9wk7NTK"]' at line 1


However, if I change the SQL to this, it works:

Code: Select all

MariaDB [owncloud]> insert into oc_users ( uid, password ) values ( "admin", "1|$2y$10$marLFxzMq3PzM15G0Ijf0OXNdH3\/vbQXaq24\/rnAqUiIWM9wk7NTK");
Query OK, 1 row affected (0.00 sec)


So is there a mismatch with the syntax being fed to MariaDB?

I still don't know how to proceed, though.

advTHANKSance

usonianhorizon
Newbie
Posts: 6
Joined: Wed Apr 27, 2016 12:00 am
ownCloud version: 9.0.1
Webserver: Apache
Database: MySQL
OS: Linux
PHP version: 5

Re: Fresh Install: mysql exception while executing 'INSERT `oc_users` ...

Postby usonianhorizon » Wed Apr 27, 2016 2:16 am

Oops. I didn't realize that the message was from ./3rdparty/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php

I blindly assumed that it was coming from MariaDB without looking carefully.

RealRancor
ownCloud master
Posts: 17381
Joined: Sat May 26, 2012 3:00 pm
ownCloud version: 9.0.2
Webserver: nginx
Database: MySQL
OS: Linux
PHP version: 7.0.x

Re: Fresh Install: mysql exception while executing 'INSERT `oc_users` ...

Postby RealRancor » Wed Apr 27, 2016 7:59 am

Hi,

you need to change the binlog format like described here:

https://doc.owncloud.org/server/9.0/adm ... ng-enabled
*gone*

usonianhorizon
Newbie
Posts: 6
Joined: Wed Apr 27, 2016 12:00 am
ownCloud version: 9.0.1
Webserver: Apache
Database: MySQL
OS: Linux
PHP version: 5

Re: Fresh Install: mysql exception while executing 'INSERT `oc_users` ...

Postby usonianhorizon » Wed Apr 27, 2016 1:55 pm

Many, many thanks!

I had read the binlog_format section yesterday during my search, but it never dawned on me that *it* was the cause the of error, rather than just a failure to *log* the error.

It would be useful, I think, to add these lines to the docs so that all the information is in one place:

To modify BINLOG_FORMAT, add the following line to your mysql configuration file, usually /etc/mysql/my.cnf (see https://mariadb.com/kb/en/mariadb/mysqld-configuration-files-and-groups/), near the other options for BINLOG_FORMAT:

Code: Select all

binlog_format = MIXED


And then restart the mysql service.

For systems using upstart:

Code: Select all

sudo service mysql restart




As well, I think that is might also be helpful to add it to the recipe for the section "Manual Installation on Linux."

Now on to testing the installation with OpenLDAP :D

Again, my thanks.

RealRancor
ownCloud master
Posts: 17381
Joined: Sat May 26, 2012 3:00 pm
ownCloud version: 9.0.2
Webserver: nginx
Database: MySQL
OS: Linux
PHP version: 7.0.x

Re: Fresh Install: mysql exception while executing 'INSERT `oc_users` ...

Postby RealRancor » Wed Apr 27, 2016 2:06 pm

Hi,

you can post suggestions / improvements to the documentation at the issue tracker here:

https://github.com/owncloud/documentation/issues
*gone*


  • Similar Topics
    Replies
    Views
    Last post

Return to “ownCloud Server 9.0”

Who is online

Users browsing this forum: No registered users and 2 guests