Title: Database update error
Last modified: August 11, 2022

---

# Database update error

 *  Resolved [Cheryl](https://wordpress.org/support/users/tricheryltops/)
 * (@tricheryltops)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/database-update-error-4/)
 * Hi,
    I just started getting the following message in my wp-admin area:
 *     ```
       Events Manager is trying to update your database, but the following error occured:
   
       FUNCTION pwdkxqqjfm.RANDOM_BYTES does not exist
   
       It might be that reloading this page one or more times may complete the process, if you have a large number of bookings in your database. Alternatively, you can run one of these two queries directly into your WP database:
   
       UPDATE wp_hboz_em_bookings SET booking_uuid= LOWER(CONCAT( HEX(RANDOM_BYTES(4)), '', HEX(RANDOM_BYTES(2)), '4', SUBSTR(HEX(RANDOM_BYTES(2)), 2, 3), '', HEX(FLOOR(ASCII(RANDOM_BYTES(1)) / 64) + 8), SUBSTR(HEX(RANDOM_BYTES(2)), 2, 3), '', hex(RANDOM_BYTES(6)) ))
   
       OR
       UPDATE wp_hboz_em_tickets_bookings SET ticket_uuid= UUID()
       ```
   
 * I tried running the query. The first one returned the same error about RANDOM_BYTES
   not existing. The second one said it was successful but the error message recurs.
 * I don’t use the bookings function. How can I fix this? Thanks.

Viewing 15 replies - 1 through 15 (of 19 total)

1 [2](https://wordpress.org/support/topic/database-update-error-4/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/database-update-error-4/page/2/?output_format=md)

 *  [Head Goldfish](https://wordpress.org/support/users/shoelaced/)
 * (@shoelaced)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/database-update-error-4/#post-15909197)
 * Experiencing the same issue.
 *  [Jos Klever](https://wordpress.org/support/users/josklever/)
 * (@josklever)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/database-update-error-4/#post-15909351)
 * The function RANDOM_BYTES doesn’t exist in MariaDB versions <10.10.0
    This version
   is still in Alpha phase, so this should not run on any production server.
 *  Thread Starter [Cheryl](https://wordpress.org/support/users/tricheryltops/)
 * (@tricheryltops)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/database-update-error-4/#post-15909371)
 * Well, I’m not sure what to do. The only settings for MariaDB available on my 
   hosting platform were 10.1,10.2,10.3,10.4,10.5, and 10.6. I changed the version
   to see if it would made a difference. It did not, and now I cannot downgrade.
 *  [Jos Klever](https://wordpress.org/support/users/josklever/)
 * (@josklever)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/database-update-error-4/#post-15909435)
 * I’ve downgraded to 6.0.1 for now. You can download it at the bottom of [https://wordpress.org/plugins/events-manager/advanced/](https://wordpress.org/plugins/events-manager/advanced/)
   or use a plugin like WP Rollback.
    After the rollback I still needed to close
   the notification, but I hope this gets fixed soon in 6.1.1
 *  [Henning Stummer](https://wordpress.org/support/users/henningstummer/)
 * (@henningstummer)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/database-update-error-4/#post-15909537)
 * I have the same error. But I don’t use the booking function – therefor the table
   is empty.
 * Please put a “Dismiss” button on that notification.
 *  [Kristian Yngve](https://wordpress.org/support/users/kristianngve/)
 * (@kristianngve)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/database-update-error-4/#post-15909958)
 * Same – I don’t use the booking function – therefore the table is empty.
 * I will “Dismiss” button on that notification in hopes they get their act together
   and fix this self-made bug 🙁
 * PS: I wish they would consider all aspects before doing reckless things like 
   this – as plugin creators. Personally, I see it as irresponsible and can encourage
   harmful plugin ratings.
 * I express this as I googled the issue and their competitors keep coming up at
   the top of Google promising solutions and better UI ~
 * I’ll await the update and close down this buggy warning for now in hopes they’re
   not damaging my Database … ugggh
 * EDIT: the notification doesn’t go if you change pages – god damn it…
    -  This reply was modified 3 years, 10 months ago by [Kristian Yngve](https://wordpress.org/support/users/kristianngve/).
 *  [arnoschouten](https://wordpress.org/support/users/arnoschouten/)
 * (@arnoschouten)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/database-update-error-4/#post-15910415)
 * I did an install on a fresh wordpress installation. No errors.
    -  This reply was modified 3 years, 10 months ago by [arnoschouten](https://wordpress.org/support/users/arnoschouten/).
 *  [tnchuntic](https://wordpress.org/support/users/tnchuntic/)
 * (@tnchuntic)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/database-update-error-4/#post-15910596)
 * Here too experiencing issue no idea what cause the issue. Any updates from the
   author/developer?
 *  [rcamorc](https://wordpress.org/support/users/rcamorc/)
 * (@rcamorc)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/database-update-error-4/#post-15911056)
 * This error occurred on my website too. Tried both queries, but nothing happened.
 *  [Lawrence DAINES](https://wordpress.org/support/users/ldaines/)
 * (@ldaines)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/database-update-error-4/#post-15911095)
 * Experiencing the same issue.
    I tried running the queries. The first one returned
   error: FUNCTION axedit_steph.RANDOM_BYTES does not exist The second one was successful
   but the error message is still there.
 *  [bgswebmaster](https://wordpress.org/support/users/bgswebmaster/)
 * (@bgswebmaster)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/database-update-error-4/#post-15912246)
 * Ditto here as well.
 * Run the queries…
    The first one returned error: FUNCTION axedit_steph.RANDOM_BYTES
   does not exist.
 * The second one was successful but 0 records updated.
 * The error message is still there.
 *  [dimitri242](https://wordpress.org/support/users/dimitri242/)
 * (@dimitri242)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/database-update-error-4/#post-15912846)
 * Experiencing the same issue.
 *     ```
       Events Manager is trying to update your database, but the following error occured:
   
       FUNCTION dbs8249059.RANDOM_BYTES does not exist
   
       It might be that reloading this page one or more times may complete the process, if you have a large number of bookings in your database. Alternatively, you can run one of these two queries directly into your WP database:
   
       UPDATE CIVpqKBKem_bookings SET booking_uuid= LOWER(CONCAT( HEX(RANDOM_BYTES(4)), '', HEX(RANDOM_BYTES(2)), '4', SUBSTR(HEX(RANDOM_BYTES(2)), 2, 3), '', HEX(FLOOR(ASCII(RANDOM_BYTES(1)) / 64) + 8), SUBSTR(HEX(RANDOM_BYTES(2)), 2, 3), '', hex(RANDOM_BYTES(6)) ))
   
       OR
       UPDATE CIVpqKBKem_tickets_bookings SET ticket_uuid= UUID()
       ```
   
 *  Plugin Author [Marcus (aka @msykes)](https://wordpress.org/support/users/netweblogic/)
 * (@netweblogic)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/database-update-error-4/#post-15913519)
 * Hi everyone, sorry for the bug which is now fixed in a dev version you can already
   get. Here’s my reply on the issue, reposted from [this thread](https://wordpress.org/support/topic/random_bytes-does-not-exist/#post-15913511):
 * For anyone with this issue, we’ve updated a dev version 6.1.0.1 which fixes this
   specific issue (tested and confirmed). We’ll release a regular update within 
   the next day or sooner.
 * To upgrade to a dev version, visit _Dashboard > Events > Settings > Admin Tools_
   and click the _Check Dev Updates_ button. You’ll see the update appear on your
   plugins/updates page. You can also manually update by downloading the dev versions
   [from our downloads page](https://eventsmanagerpro.com/downloads/). For more 
   detailed instructions, see our [documentation for upgrading to dev versions](http://wp-events-plugin.com/documentation/upgrade-dev-version/).
 * The issue was mainly related to the adding of UUID for old bookings and ticket
   bookings, in theory this shouldn’t have affected your installation as the main
   use of UUIDs are currently for the recent Pro features like QR tickets and checkins.
 * It looks like the error is limited to those using MariaDB (correctly identified
   by [@guidodr](https://wordpress.org/support/users/guidodr/)) instead of mySQL,
   that RANDOM_BYTES function in the SQL statement is available in MariaDB 10.10
   and I believe we misread the min WP version with 10.1 (the trailing 0 made all
   the difference!). Whilst we usually keep relatively straightforward SQL statements,
   we’ll be more mindful of our MariaDB users moving forward, should we ever need
   to add with more complex queries.`
    -  This reply was modified 3 years, 10 months ago by [Marcus (aka @msykes)](https://wordpress.org/support/users/netweblogic/).
    -  This reply was modified 3 years, 10 months ago by [Marcus (aka @msykes)](https://wordpress.org/support/users/netweblogic/).
 *  [Jos Klever](https://wordpress.org/support/users/josklever/)
 * (@josklever)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/database-update-error-4/#post-15913550)
 * [@netweblogic](https://wordpress.org/support/users/netweblogic/) The dev update
   seems to work. Hopefully you can check this forum sooner after releasing an update,
   because you thank [@guidodr](https://wordpress.org/support/users/guidodr/) for
   mentioning this issue, although I was the one who mentioned it 28 hours earlier
   here in this topic.
 *  [Guido](https://wordpress.org/support/users/guidodr/)
 * (@guidodr)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/database-update-error-4/#post-15913654)
 * Jos [@josklever](https://wordpress.org/support/users/josklever/) you’re right,
   you have been earlier with your hint. 😉
    Probably your hint was just overseen.
 * I only had seen your post after I had already analyzed and posted it in another
   thread that was titled with “[RANDOM_BYTES does not exist](https://wordpress.org/support/topic/random_bytes-does-not-exist/)”
   
   There I had also posted the link to the MariaDB Knowledge Base entry for RANDAM_BYTES
   which probably made it easier for Marcus to solve the problem.
 * best regards to the Netherlands
    Guido

Viewing 15 replies - 1 through 15 (of 19 total)

1 [2](https://wordpress.org/support/topic/database-update-error-4/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/database-update-error-4/page/2/?output_format=md)

The topic ‘Database update error’ is closed to new replies.

 * ![](https://ps.w.org/events-manager/assets/icon-256x256.png?rev=3550347)
 * [Events Manager - Calendar, Bookings, Tickets, and more!](https://wordpress.org/plugins/events-manager/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/events-manager/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/events-manager/)
 * [Active Topics](https://wordpress.org/support/plugin/events-manager/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/events-manager/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/events-manager/reviews/)

## Tags

 * [errors](https://wordpress.org/support/topic-tag/errors/)

 * 19 replies
 * 14 participants
 * Last reply from: [enolbos](https://wordpress.org/support/users/enolbos/)
 * Last activity: [3 years, 8 months ago](https://wordpress.org/support/topic/database-update-error-4/page/2/#post-16043905)
 * Status: resolved