Set a Max Execution Time in Your MYSQL Query

Sometimes I need to run a long query. Or sometimes when running one using TablePlus and it is taking a long time the kill process doesn’t always work. You can set a timeout with this syntax in your select /*+ MAX_EXECUTION_TIME(2000) */. The time is in milliseconds. This is a part of the mysql optimizer … Continued

How to convert your latin1 mysql table to utf8

Convert the existing columns content if there are unicode characters saved in non utf8 column: UPDATE `databasename`.`prescription_template_billing_item` SET description = @txt WHERE char_length(description) = LENGTH(@txt := CONVERT(BINARY CONVERT(description USING latin1) USING utf8)); Have MYSQL loop through . all of your tables and columns finding all the necessary columns which have types needing to be converted: … Continued

Add Special Chars to WordPress TinyMCE Char Map

Had an issue where a clients blog post had one of these in the post and it wasn’t being displayed right. The real issue was changing the ‘post_content’ field of the wp_posts table to UTF-8 Unicode (utf8mb4) from cp1252 West European, but (!) along the way I tried this. Put this in a plugin or functions.php and … Continued