content_image/735365.jpg
1. Download the tar.gz packages for mecab  and mecab-ipadic  from http://taku910.github.io/mecab/ #download. As of February, 2016, the latest available packages are mecab-0.996.tar.gz  and mecab-ipadic-2.7.0-20070801.tar.gz . 

2. Install mecab : 

tar zxfv mecab-0.996.tar cd mecab-0.996 ./configure make make check su make install 

3. Install mecab-ipadic : 

tar zxfv mecab-ipadic-2.7.0-20070801.tar cd mecab-ipadic-2.7.0-20070801 ./configure make su make install 

4. Compile MySQL using the WITH_MECAB  CMake option. Set the WITH_MECAB  option to system  if you have installed mecab  and mecab-ipadic  to the default location. 

-DWITH_MECAB=system 

If you defined a custom installation directory, set WITH_MECAB  to the custom directory. For example: 

## 12.11 Cast Functions and Operators 

-DWITH_MECAB=/path/to/mecab 

<img src='content_image/735365.jpg'>

Cast functions and operators enable conversion of values from one data type to another. 

CONVERT()  with a USING  clause converts data between character sets: 

CONVERT( expr  USING transcoding_name ) 

In MySQL, transcoding names are the same as the corresponding character set names. 

Examples: 

SELECT CONVERT(’test’ USING utf8mb4); SELECT CONVERT(_latin1’Müller’ USING utf8mb4); INSERT INTO utf8mb4_table (utf8mb4_column) SELECT CONVERT(latin1_column USING utf8mb4) FROM latin1_table; 

To convert strings between character sets, you can also use CONVERT( expr , type )  syntax (without USING ), or CAST( expr  AS type ) , which is equivalent: 

CONVERT( string , CHAR[( N )] CHARACTER SET charset_name ) 

