I recently upgraded an older version of mediawiki to the recent version. The upgrade seems to have changed the data in the mediawikiuser database table from plaintext to a binary encoding. (My database is MySQL 8.0.)
I have some SQL scripts that try to read and write some of these fields (mainly user_name, user_real_name, user_email, user_password), but the data format change breaks these SQL scripts.
Could someone explain what binary encoding is being used, and how I might change my SQL scripts so that they are able to read and write the data using the binary encoding? (Or, alternatively, is there an option to not use the binary encoding and to go back to using plain text?)
Thanks Mike
Mysql shouldn't really make a distiction between binary and text, and you should be able to edit them just normally.
I'm not sure how your script is failing but if its really an issue you should be able to use the CAST operator in your sql query to change the type.
We've been using binary for these fields since basically forever. I believe the reason is really old versions of mysql had some really unfortunate behaviour related to unicode, charsets and collations, and we wanted it to just be consistent and not mess with things. I imagine most of those issues arent as applicable in modern times with utf8mb4, but it still seems easier to just make mysql not mess with encoding.
-- Brian
On Thursday, November 5, 2020, Mike Wertheim mike.wertheim@gmail.com wrote:
I recently upgraded an older version of mediawiki to the recent version. The upgrade seems to have changed the data in the mediawikiuser database table from plaintext to a binary encoding. (My database is MySQL 8.0.)
I have some SQL scripts that try to read and write some of these fields (mainly user_name, user_real_name, user_email, user_password), but the data format change breaks these SQL scripts.
Could someone explain what binary encoding is being used, and how I might change my SQL scripts so that they are able to read and write the data using the binary encoding? (Or, alternatively, is there an option to not use the binary encoding and to go back to using plain text?)
Thanks Mike
Thank you sir
On Thu, Nov 5, 2020 at 9:43 PM Brian Wolff bawolff@gmail.com wrote:
Mysql shouldn't really make a distiction between binary and text, and you should be able to edit them just normally.
I'm not sure how your script is failing but if its really an issue you should be able to use the CAST operator in your sql query to change the type.
We've been using binary for these fields since basically forever. I believe the reason is really old versions of mysql had some really unfortunate behaviour related to unicode, charsets and collations, and we wanted it to just be consistent and not mess with things. I imagine most of those issues arent as applicable in modern times with utf8mb4, but it still seems easier to just make mysql not mess with encoding.
-- Brian
On Thursday, November 5, 2020, Mike Wertheim mike.wertheim@gmail.com wrote:
I recently upgraded an older version of mediawiki to the recent version. The upgrade seems to have changed the data in the mediawikiuser database table from plaintext to a binary encoding. (My database is MySQL 8.0.)
I have some SQL scripts that try to read and write some of these fields (mainly user_name, user_real_name, user_email, user_password), but the data format change breaks these SQL scripts.
Could someone explain what binary encoding is being used, and how I might change my SQL scripts so that they are able to read and write the data using the binary encoding? (Or, alternatively, is there an option to not use the binary encoding and to go back to using plain text?)
Thanks Mike
MediaWiki-l mailing list To unsubscribe, go to: https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
mediawiki-l@lists.wikimedia.org