An exception occurred while executing ‘INSERT INTOエラーの対処方-owncloud

前回owncloudをインストールしました。ただインストールしたらエラーとなってしまいました。今回はこのエラー対策をしたいと思います。

エラー内容

MariaDBにowncloudをインストール使用としました。そうしたらエラーがでてしまいした。

[c]
An exception occurred while executing 'INSERT INTO `oc_users` ( `uid`, `password` ) VALUES( ?, ? )' with params ["wni", "1|$2y$10$HpESmS8inb\/Q\/lMCb9nALuF8rcFHq0c8Q7MHr6KAXPus0ZlJSgeN6"]:

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.
[/c]

という内容です。

対処方

この対処方はMariaDBに追記することで直せます。

binlog_format=mixedを追記する

/etc/my.conf にbinlog_format=mixedと追記します。
[c]
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0
# Settings user and group are ignored when systemd is used.
# If you need to run mysqld under a different user or group,
# customize your systemd unit file for mariadb according to the
# instructions in http://fedoraproject.org/wiki/Systemd

#
binlog_format=mixed #追記

[mysqld_safe]
log-error=/var/log/mariadb/mariadb.log
pid-file=/var/run/mariadb/mariadb.pid

#
# include all files from the config directory
#
!includedir /etc/my.cnf.d
[/c]

このようにして再起動すると直ります。

この記事に関する技術サポート・ご相談

「手順通りにいかない」「自社環境への構築を代行してほしい」など、
インフラ・サーバー周りでハマった際はお気軽にご相談ください。

相談・問い合わせフォームを開く

※ Googleフォームへ移動します(初回相談無料)

個人支援・寄付について

サイトラボでは個人支援・寄付を受けております。ご協力いただける方はお願いいたします。当サイトではビットコインで受け付けております。

  • ビットコイン:3LHnADwZwUbic2L45EnVJEykiG6KfbqrwS