Error spam "[BentoBox] Could not check if key exists in database!" after MariaDB/MySQL version update
See original GitHub issueDescription
Describe the bug
I have updated my mysql servers and after that, bentobox spams console with this error:
Steps to reproduce the behavior
Use latested MariaDB or MySQL server. Tested on both - same result. Only Bentobox has problems, any other plugin works fine.
Expected behavior
Screenshots and videos (Optional)
Environment
BentoBox Version (Mandatory)
1.11.0
Plugins (Optional)
[08:38:31 INFO]: Plugins (48): ActionHealth*, antiRedstoneClock, AuctionHouse, BentoBox, BossShopPro, ChatInjector*, ClearLag, ColoredSigns*, CommandButtons, CraftBook, Essentials, EssentialsChat, EssentialsProtect, EssentialsSpawn, HeadDatabase*, HolographicDisplays, ItemShops*, LiteJoin*, MorkazSk, MoxChatTitles, MoxCore, MoxFables, MoxPerms*, MoxPlayerParticles, MoxPremiumShop, MoxTokensDatabase*, MoxTransmutators, Multiverse-Core*, NoCheatPlus, PlaceholderAPI, PlugMan, ProtocolLib, ProtocolSupport, SAML, SK-NBeeT, SkQuery, skRayFall*, Skript, spark, SQLibrary*, TAB, TuSKe*, Vault, VoidGenerator, WorldBorder, WorldBorderAPI*, WorldEdit, WorldGuard
Additional context (Optional)
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (5 by maintainers)
Top Results From Across the Web
MariaDB sql trigger to update if key exists or insert if doesn't ...
I want it to update some table values if the key already exists, or insert it with some new values if it doesn't...
Read more >Database API - BentoBox World
BentoBox provides a database API for developers so you do not have to make one yourself. The BentoBox database can be chosen to...
Read more >SOLVED - [CPANEL-32712] Updating to MariaDB 10.3.23 on ...
This MariaDB update occurs automatically when updating cPanel with a version that includes support for MariaDB 10.3. Symptoms The cPanel -> MySQL Databases...
Read more >MySQL complains key exists but I can't find it
I am unable to drop foreign keys using ALTER TABLE syntax, it gives error "Table doesn't exist in the engine". That is with...
Read more >interesting_websites.pdf - WordPress.com
The NSA can't remotely turn on all phones (erratasec.com) ... HFT Quote Stuffing is a software bug (chrisstucchio.com).
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks a lot tastybento. You have explained it very well. People like me will now have answer in the future.
Edit: Thanks a lot. It works! I was thinking that phpmyadmin uses only mysql commands & features to everything including dumping databases. I am sorry I did not give information that I was dumping databases and I was using phpmyadmin. I am hoping this world will have more developers like you 😃
I found the issue: your phpMyAdmin is an old version and does not know how to export JSON databases so the table creation SQL is wrong. For example, here is the table creation SQL from the file you gave me for the Island table:
You can see that it does not make the
uniqueId
column. That’s why you are getting the error. There is no uniqueId to look up.The correct SQLmust be like this:
The version of phpMyAdmin you are using is 4.6.6deb64. JSON support was added in 4.7.0, so you need to upgrade. Latest version is 4.9.5.. Having said that, I do not know for certain if it supports full exporting of JSON enabled databases because there is a still open bug on it here.
If phpMyAdmin doesn’t work, then use the
mysqldump
command to export the database:for example:
When I did this, the CREATE TABLE sql was correct, for example:
If you have a running version of the database then I recommend you use the mysqldump command to copy it to the newer database. Just in case, I cleaned up your file and here’s the fixed version: Bentobox_Caveblock.sql.zip However, I recommend using a proper dump from your working database.
I hope that fixes the problem for you.