Tag Info

Hot answers tagged

2

The solution isn't precisely the same but this question is where I originally found direction for a similar issue and the concepts there should take you where you want to go. MySQL has a BINARY character set and from all appearances, by converting through it, you can prevent MySQL from realizing what you're actually doing and being "too helpful." Test case ...


2

Think about it: You are storing data in the database as latin1 You are data is handled internally by mysqld as latin1 If data coming from the OS or from the connection is utf8, how is mysqld going to treat it? Rather than guessing or hoping for the best, you could change the incoming character set behavior. With the exception of information_schema and ...


2

After some trial and error, I've learned how and where to apply COLLATE: Converted lines like: SELECT SOMETHING FROM SOMEWHERE WHERE table_schema = given_database AND table_name = given_table AND index_name = given_index; To: SELECT SOMETHING FROM SOMEWHERE WHERE table_schema COLLATE utf8_unicode_ci = given_database AND table_name COLLATE ...


2

Opinion It's probably better to throw an exception during your applications input checking and not pass the buck to the database. Workaround There is a "workaround" but your mileage may vary: http://forge.mysql.com/worklog/task.php?id=3780 Brute Force? You could convert your front end table VARCHAR field to a BLOB and store as binary data to cure the ...


2

You could try turning on the general query log, which logs every query the server receives, and then use that information to see what's being queried, and then issue those queries yourself and examine the data. To see the current setting for the general log (location and whether it's enabled): mysql> SHOW VARIABLES LIKE 'general_log%'; # shows the ...


2

POLITICALLY CORRECT ANSWER You cannot do MySQL Replication from a New Master to an Old Slave I have written many posts about this: Nov 26, 2012 : Replicate MySQL 5.0 Master to 5.5 Slave? Feb 08, 2012 : will replication from 5.5.20 to 5.0.XX server work? Dec 22, 2011 : What does the base64 BINLOG statements in mysqlbinlog output mean? Feb 04, 2011 : MySQL ...


2

Your list of characters that must be supported clearly indicates you need nothing more than plain ascii. If you want to stored this as text, then this ascii is your most compact way. But here are a few clarifications: VARCHAR(10) does not "need" 80 bits. It may need 80 bits, if all characters are used, under ascii character set. If you only store 3 ...


1

From my experience storing such data, is it perfectly safe to transmit binary data when the character encoding of the connection is configured as UTF-8. The character encoding is just that: a way of representing the characters in binary form (this is the crux of the issue in Python bytes/str problems). MySQL rightly does not try to 'encode' binary data. ...


1

Disclaimer: I’m the author of How to support full Unicode in MySQL databases, the guide you’re following. Where did you save the modified settings? Check where mysqld loads the default options from. It’s usually /etc/my.cnf (as mentioned in the guide) but it may be different on your system. Run the following command to find out: $ mysqld --help --verbose ...


1

You'll have to specify a character set of UTF8 on the table schema. See http://dev.mysql.com/doc/refman/5.5/en/charset-syntax.html Depending on your needs you can specify table defaults which then apply to all unspecified text columns (char/varchar/text) or you can specify on a per column level. You'll also need to have your applications to specify a ...


1

Client Encoding Mismatch is an error message from old versions of the PostgreSQL ODBC driver. You should go here: http://www.postgresql.org/ftp/odbc/versions/msi/ to get the most recent version and update your system. Also there are in fact two driver flavors that get installed: ANSI and Unicode. Presumably you need Unicode if you decided to switch to ...


1

How much data do you have? You could compare length and char_length of data values to return all the multibyte data, but if you have a ton of data, this will be too much to visually process. Start with something like: select [Column] from [Database].[Table] where length([Column]) != char_length([Column]) And use some OR statements in the where clause. ...


1

You need to ask the database from another angle. Please run this: SHOW CREATE DATABASE mydb; This will tell you what it sees. If you want to change the Character set and.or collation, do this: ALTER DATABASE mydb ... ; In mysql, ALTER DATABASE can change character set and/or collation. I have mentioned this in my past posts in the DBA StackExchange : ...



Only top voted, non community-wiki answers of a minimum length are eligible