linux:scribble
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | Next revisionBoth sides next revision | ||
linux:scribble [2017/05/16 13:34] – add tricks for Jenkins stybla | linux:scribble [2018/07/27 01:54] – How to change encoding of MySQL DB and tables stybla | ||
---|---|---|---|
Line 301: | Line 301: | ||
Funny thing is, it seems much harder to resize encrypted partition via cryptsetup/ | Funny thing is, it seems much harder to resize encrypted partition via cryptsetup/ | ||
+ | |||
+ | ===== MySQL ===== | ||
+ | |||
+ | ==== Convert database to UTF-8 encoding ==== | ||
+ | |||
+ | Originally found at [[https:// | ||
+ | |||
+ | Run mysql and check the encoding: | ||
+ | |||
+ | < | ||
+ | SELECT default_character_set_name FROM information_schema.SCHEMATA S WHERE schema_name = " | ||
+ | SELECT CCSA.character_set_name FROM information_schema.`TABLES` T, | ||
+ | </ | ||
+ | |||
+ | Change encoding of tables: | ||
+ | |||
+ | < | ||
+ | cat > ~/.my.cnf <<EOF | ||
+ | [client] | ||
+ | user=USER | ||
+ | password=PASSWORD | ||
+ | EOF | ||
+ | mysql --database=DBNAME -B -N -e "SHOW TABLES" | ||
+ | </ | ||
+ | |||
+ | Change encoding of DB itself: | ||
+ | < | ||
+ | ALTER DATABASE DBNAME CHARACTER SET utf8 COLLATE utf8_general_ci; | ||
+ | </ | ||
+ | |||
+ | Remove '' | ||
+ | |||
===== OpenOffice/ | ===== OpenOffice/ |
linux/scribble.txt · Last modified: 2022/07/06 17:27 by stybla