發表文章

目前顯示的是 4月, 2015的文章

docker mysql image encoding change to utf8

最近在使用docker的mysql image掛載mysql db時候 發現server的語系都是在latin1的狀態 而mysql image又不允許直接把my.cnf換掉... 但是可以overwrite /etc/mysql/conf.d這個資料匣 來重寫mysqld的語系設定... 這是原始資料庫啟動後透過"\s"來查看server狀態 # mysql -h123.123.123.123 -uroot -p Enter password: Welcome to the MySQL monitor.  Commands end with ; or \g. Your MySQL connection id is 3 Server version: 5.5.42 MySQL Community Server (GPL) Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> \s -------------- mysql  Ver 14.14 Distrib 5.5.41, for debian-linux-gnu (x86_64) using readline 6.2 Connection id: 3 Current database: Current user: root@123.123.123.123 SSL: Not in use Current pager: stdout Using outfile: '' Using delimiter: ; Server version: 5.5.42