主要就是两个mysql内部函数to_base64和from_base64,使用也很简单,如下:
mysql
5.6之前不支持
mysql> select version(); +-----------+ | version() | +-----------+ | 5.7.11 | +-----------+ 1 row in set (0.00 sec) mysql> select to_base64('helloworld'); +-------------------------+ | to_base64('helloworld') | +-------------------------+ | aGVsbG93b3JsZA== | +-------------------------+ 1 row in set (0.00 sec) mysql> select from_base64('aGVsbG93b3JsZA=='); +---------------------------------+ | from_base64('aGVsbG93b3JsZA==') | +---------------------------------+ | helloworld | +---------------------------------+ 1 row in set (0.00 sec)