Quick search in a table to find and replace text in a field. Replace the fields in the [] below with your fields.
|
1 |
update [table_name] set [field_name] = replace([field_name],'[string_to_find]','[string_to_replace]'); |
Quick search in a table to find and replace text in a field. Replace the fields in the [] below with your fields.
|
1 |
update [table_name] set [field_name] = replace([field_name],'[string_to_find]','[string_to_replace]'); |
“Double-encoded UTF-8 text (not to mention triple-, quadruple- and so on) are a fairly common problem when dealing with MySQL. This may be due to the fact that the default character set of the connection to the server is Latin-1, but that is not relevant once the data is already corrupt.
Here is how to fix it, in two simple steps, using the mysqldump and mysql commands:
|
1 2 |
mysqldump -h DB_HOST -u DB_USER -p DB_PASSWORD --opt --quote-names --skip-set-charset --default-character-set=latin1 DB_NAME > DB_NAME-dump.sql mysql -h DB_HOST -u DB_USER -p DB_PASSWORD --default-character-set=utf8 DB_NAME < DB_NAME-dump.sql |
Of course, you should first replace DB_HOST, DB_USER, DB_PASSWORD and DB_NAME with values, corresponding to your database setup.”
This was from some StackExchange (or something like that) reply to a person’s problem, if I remember correctly.
This error occurs sometimes because computers are shit and everyone sucks balls at writing software properly.
To fix this, you need to manually add a key to the config. This is assuming you already have the config, and that you don’t need to copy/rename the sample config.
Go to this site to get a key: phpMyAdmin Blowfish Secret Generator.
You enter that key into config.inc.php, in your phpmyadmin directory. Debian is usually /etc/phpmyadmin.
Enter it into/add the following line: $cfg['blowfish_secret'] = 'BLOWFISH PASSWORD HERE';
Obviously, you replace the giant letters, that tell you where you put your key, with the key.
The first link I found, when I searched for this, was most useful: Question Defense.
It’s really sad that some packages are still this broken, after more than four years. I should note that I only experienced this issue for the first time and it was on an x64 build of Debian 6.