MySQL Percona 5.6 GA Release, 詳見: Percona Server 5.6.13-61.0 first GA release is now available
Debian 若是 APT 設定 Percona Repository 的話, apt-get dist-upgrade 就會自動升級了, 但是若 my.cnf 有些額外設定, 可能會無法啟動, 此篇紀錄遇到的問題解法.
MySQL Percona 由 5.5 升級到 5.6 設定問題解決方法
於 Debian 下 apt-get dist-upgrade 就出現下述訊息:
以下新套件將會安裝:
libmysqlclient18.1{a} percona-server-client-5.6{a} percona-server-common-5.6{a} percona-server-server-5.6{a}
以下新套件將會移除:
libmysqlclient-dev{u} percona-server-client-5.5{a} percona-server-common-5.5{a} percona-server-server-5.5{a}
若只有升級到 5.5, 沒有升到 5.6 (有 Package 衝突), 想要手動上 5.6, 可以使用下述語法:
- apt-get install percona-server-client-5.6 percona-server-common-5.6 percona-server-server-5.6
因為 MySQL 的 /etc/mysql/my.cnf 有額外作些設定, 於是就會如下述:
Stopping MySQL (Percona Server): mysqld.
Starting MySQL (Percona Server) database server: mysqld . . . . . . . . . . . . . . failed!
追蹤與解法
- sudo /etc/init.d/mysql stop
- tail -f /var/log/syslog # 看有哪些錯誤訊息
- grep 'unknown variable' /var/log/syslog # 可以看到有哪些參數被移除了, 進去 my.cnf 將那些參數先註解掉, ex:
unknown variable 'table_cache=1024'
unknown variable 'log_slow_queries=/var/log/mysql/mysql-slow.log'上述的訊息, 就將 table_cache / log_slow_queries 註解掉即可.
- sudo /etc/init.d/mysql start # 應該就正常了
- 註: log_slow_queries 改成 slow_query_log
再來是安裝完成後, 有些 Warning 要注意:
- [Warning] Using unique option prefix key_buffer instead of key_buffer_size is deprecated and will be removed in a future release. Please use the full name instead.
- [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
- [Warning] Using unique option prefix myisam-recover instead of myisam-recover-options is deprecated and will be removed in a future release. Please use the full name instead.