Next Illuminate\Database\QueryException: SQLSTATE[42000]: Syntax error or access violation: 1104 The SELECT would examine more than MAX_JOIN_SIZE rows; check your WHERE and use SET SQL_BIG_SELECTS=1 or SET MAX_JOIN_SIZE=# if the SELECT is okay (SQL: select * from posts where posts.id in (12, 13, 14, 15, 16, 17, 18, 19, 21, 30, 33, 34, 35, 36, 37, 38, 41, 42, 44, 45) and type in (discussionTagged, recipientLeft, recipientsModified, madePublic, discussionStickied, discussionLocked, comment, discussionRenamed)) in /home/freehos4/fh4uf/flarum_fh4u/vendor/illuminate/database/Connection.php:712
In your config.php you see an array of data that define your database connection:
<?php return array (
'debug' => false,
'database' =>
array (
'driver' => 'mysql',
'host' => 'localhost',
'port' => 3306,
'database' => 'flarum',
'username' => 'root',
'password' => NULL,
'charset' => 'utf8mb4',
'collation' => 'utf8mb4_unicode_ci',
'prefix' => NULL,
'strict' => false,
'engine' => 'InnoDB',
'prefix_indexes' => true,
),
'url' => 'http://flarum.test',
'paths' =>
array (
'api' => 'api',
'admin' => 'admin',
),
'headers' =>
array (
'poweredByHeader' => true,
'referrerPolicy' => 'same-origin',
),
);
Edit this file by adding the following in this file:
'options' => array(
PDO::MYSQL_ATTR_INIT_COMMAND => 'SET SESSION SQL_BIG_SELECTS=1',
),
Like so:
<?php return array (
'debug' => false,
'database' =>
array (
'driver' => 'mysql',
'host' => 'localhost',
'port' => 3306,
'database' => 'flarum',
'username' => 'root',
'password' => NULL,
'charset' => 'utf8mb4',
'collation' => 'utf8mb4_unicode_ci',
'prefix' => NULL,
'strict' => false,
'engine' => 'InnoDB',
'prefix_indexes' => true,
'options' => array(
PDO::MYSQL_ATTR_INIT_COMMAND => 'SET SESSION SQL_BIG_SELECTS=1',
),
),
'url' => 'http://flarum.test',
'paths' =>
array (
'api' => 'api',
'admin' => 'admin',
),
'headers' =>
array (
'poweredByHeader' => true,
'referrerPolicy' => 'same-origin',
),
);
Make sure:
the added change is within the database part or it won't do anything.
the line above ('prefix_indexes' => true,) ends with a comma
An explicit WARNING to other people. Don't do this unless you run into exactly the same error as OP and once this is proven to resolve the issue.