convert snippets

MySQL: How to change table and database collation

Tagged collation, mysql, convert  Languages sql

Listing table information including collation

show table status;

To show all table information use this command:

show full columns from xxx;

Convert existing columns in a table to a specific collation

alter table brands convert to character set utf8 collate utf8_swedish_ci;

This command converts all existing columns to the specified collation.

Change table collation

alter table posts collate utf8_swedish_ci;

Note that this doesn't change collation of existing columns.

Setting the collation manually

set session collation_database=utf8_swedish_ci;
set session collation_connection=utf8_swedish_ci;

Common collation values


How to read Epub books on an Amazon Kindle

Tagged convert, epub, kindle, mobi  Languages bash

The Amazon Kindle does not support the Epub format, so to read Epub books on an Amazon Kindle you need to convert the book to the Mobi format.

Convert from Epub to Mobi

$ ./kindlegen your_book.epub

Send the book to your Kindle via email

For example: [email protected]

  • Send the book to your Kindle as an email attachment