Title: WordPress database error
Last modified: October 13, 2019

---

# WordPress database error

 *  Resolved [mbeerli](https://wordpress.org/support/users/mbeerli/)
 * (@mbeerli)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/wordpress-database-error-138/)
 * In my error.log file I notice a few of the following lines.
 * [08-Oct-2019 13:07:28 UTC] WordPress database error Illegal mix of collations(
   utf8_bin,IMPLICIT) and (utf8mb4_unicode_520_ci,COERCIBLE) for operation ‘=’ for
   query SELECT translated, source FROM wp_translations WHERE original = ‘😉’ and
   lang = ‘nl’ made by shutdown_action_hook, do_action(‘shutdown’), WP_Hook->do_action,
   WP_Hook->apply_filters, wp_ob_end_flush_all, ob_end_flush, transposh_plugin->
   process_page, tp_parser->fix_html, transposh_database->fetch_translation
 * Are these from the plugin?

Viewing 11 replies - 1 through 11 (of 11 total)

 *  Plugin Author [oferwald](https://wordpress.org/support/users/oferwald/)
 * (@oferwald)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/wordpress-database-error-138/#post-12044183)
 * Hi,
 * I’d guess it is originating from the plugin, however, what are the implications
   of this error? (other than annoying log lines?)
 *  Thread Starter [mbeerli](https://wordpress.org/support/users/mbeerli/)
 * (@mbeerli)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/wordpress-database-error-138/#post-12044603)
 * I first thought that it could be that someone is trying to shutdown the WP site.
   SQL injection or something. If it is an illegal mix, then I guess it can be fixed
   somehow with a cleanup function? I have the following languages enabled: (English,
   Deutsch, Espanol, Italiano, Francais and Nederlands) Is there further logging
   I can enable to help find the issue?
 *  Plugin Author [oferwald](https://wordpress.org/support/users/oferwald/)
 * (@oferwald)
 * [6 years, 6 months ago](https://wordpress.org/support/topic/wordpress-database-error-138/#post-12148476)
 * Hi,
 * I can only suggest that you check your current table collations and see what 
   they are, I remember that the switch from utf8_bin to utf8mb4 cause some issues
   in the past but I don’t remember how I got over this (sorry, getting senile),
 * If you’ll contact us through the form on our site I will be able to try to further
   help, I guess that I will need something similar to phpmyadmin access, and to
   the logging of your server, I am not really sure that its worth it, but can try
 *  Thread Starter [mbeerli](https://wordpress.org/support/users/mbeerli/)
 * (@mbeerli)
 * [6 years, 6 months ago](https://wordpress.org/support/topic/wordpress-database-error-138/#post-12148787)
 * So would a uninstall and a fresh install solve the problem?
 *  Thread Starter [mbeerli](https://wordpress.org/support/users/mbeerli/)
 * (@mbeerli)
 * [6 years, 6 months ago](https://wordpress.org/support/topic/wordpress-database-error-138/#post-12148819)
 * Ok, I switch via phpmyadmin – options the 2 tables
    wp_translations and wp_translations_log
   the Collation from utf8_bin to utf8mb4_unicode_520_ci
 * Hope that does it.
 *  Plugin Author [oferwald](https://wordpress.org/support/users/oferwald/)
 * (@oferwald)
 * [6 years, 5 months ago](https://wordpress.org/support/topic/wordpress-database-error-138/#post-12157254)
 * Fresh install seems like an overkill, did the change do the trick for you?
 *  Thread Starter [mbeerli](https://wordpress.org/support/users/mbeerli/)
 * (@mbeerli)
 * [6 years, 5 months ago](https://wordpress.org/support/topic/wordpress-database-error-138/#post-12157618)
 * so far no new error.log file was created. (about 3 days)
 *  Plugin Author [oferwald](https://wordpress.org/support/users/oferwald/)
 * (@oferwald)
 * [6 years, 5 months ago](https://wordpress.org/support/topic/wordpress-database-error-138/#post-12158919)
 * Great, thanks for the update
 *  Thread Starter [mbeerli](https://wordpress.org/support/users/mbeerli/)
 * (@mbeerli)
 * [6 years, 5 months ago](https://wordpress.org/support/topic/wordpress-database-error-138/#post-12166208)
 * Error log appeared again.
    [22-Nov-2019 14:10:13 UTC] WordPress database error
   Illegal mix of collations (utf8_bin,IMPLICIT) and (utf8mb4_unicode_520_ci,COERCIBLE)
   for operation ‘=’ for query SELECT translated, source FROM wp_translations WHERE
   original = ‘😉’ and lang = ‘fr’ made by shutdown_action_hook, do_action(‘shutdown’),
   WP_Hook->do_action, WP_Hook->apply_filters, wp_ob_end_flush_all, ob_end_flush,
   transposh_plugin->process_page, tp_parser->fix_html, transposh_database->fetch_translation
 * the 2 tables are switched to utf8mb4_unicode_520_ci.
    Since I can not restart
   the server, I switched php versions to 7.2 and back to 7.3 in order to flush 
   the connection.
 * Any other ideas?
 *  Plugin Author [oferwald](https://wordpress.org/support/users/oferwald/)
 * (@oferwald)
 * [6 years, 5 months ago](https://wordpress.org/support/topic/wordpress-database-error-138/#post-12167795)
 * Hi,
 * I think your problem is the very special character ‘😉’ try wrapping it with 
   a no_translate class where it is used
 *  Thread Starter [mbeerli](https://wordpress.org/support/users/mbeerli/)
 * (@mbeerli)
 * [6 years, 5 months ago](https://wordpress.org/support/topic/wordpress-database-error-138/#post-12168929)
 * I found another issue.
    when doing a select statement SELECT * FROM wp_translations
   WHERE original Like “%😉%”; I got the same error as above. Then I found the following:
   I switched the colation on the table but with phpmyadmin it did not switch the
   fields. So I edited the colation of the fields in the following 2 tables – wp_translations–
   wp_translations_log from wherever I had utf8_bin to utf8mb4_unicode_520_ci
 * Now the select statement does not show the error anylonger, nor did it find any
   entries
    -  This reply was modified 6 years, 5 months ago by [mbeerli](https://wordpress.org/support/users/mbeerli/).

Viewing 11 replies - 1 through 11 (of 11 total)

The topic ‘WordPress database error’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/transposh-translation-filter-for-
   wordpress_495166.svg)
 * [Transposh WordPress Translation](https://wordpress.org/plugins/transposh-translation-filter-for-wordpress/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/transposh-translation-filter-for-wordpress/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/transposh-translation-filter-for-wordpress/)
 * [Active Topics](https://wordpress.org/support/plugin/transposh-translation-filter-for-wordpress/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/transposh-translation-filter-for-wordpress/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/transposh-translation-filter-for-wordpress/reviews/)

 * 11 replies
 * 2 participants
 * Last reply from: [mbeerli](https://wordpress.org/support/users/mbeerli/)
 * Last activity: [6 years, 5 months ago](https://wordpress.org/support/topic/wordpress-database-error-138/#post-12168929)
 * Status: resolved