MyBB Community Forums

Full Version: Installing with MySQL 8.0.11
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I need to install MyBB against MySQL version 8.0.11 
(basically because I'm running two apps on the same server and the other app needs MySQL 8.0.11)

The latest version of MyBB won't work - the database creation step fails (because admin is a reserved word in 8.0.11)

I've tried to go back to find a MyBB version close to when MySQL 8.0.11 was released but none work:
e.g.

MyBB 18.17 fails creating table mybb_attachtypes (because groups is a reserved word in 8.0.11)
MyBB 18.18 fixes that issue but then fails creating table mybb_banned (because admin is a reserved word)
- It seems MySQL 8.0.12 made admin a non-reserved word

Does anyone know a version of MyBB that works with MySQL 8.0.11 and if so what version of PHP should I use (I can vary that without a problem)

Thanks in advance for your help.
Try changing admin to `admin` in the table definitions file:
https://github.com/mybb/mybb/blob/mybb_1...s.php#L148
and running the installer again.

Similarly, you may also need to change the line
https://github.com/mybb/mybb/blob/mybb_1....php#L2008
from
			$db->update_query("banned", array('admin' => $destination_user['uid']), "admin = '{$source_user['uid']}'");

to
			$db->update_query("banned", array('admin' => $destination_user['uid']), "`admin` = '{$source_user['uid']}'");

to get the ACP's Users & Groups → Users page working correctly.

Let us know if you encounter any other errors related to reserved words.
Many thanks for the reply, got it all working now Smile