»

Upgrade Mysql to MariaDB

Log — Tags: , , — Posted by Starck on February 26, 2014

Remove MySQL

Install MariaDB

To Enable Mysql General Log

Log — Tags: — Posted by Starck on October 17, 2013


Edit my.cnf:

You can also rename the general query log file at runtime by disabling the log:

SET GLOBAL general_log = 'OFF';

With the log disabled, rename the log file externally; for example, from the command line. Then enable the log again:

SET GLOBAL general_log = 'ON';


Mysql Reference

MySQL error

Log — Tags: , — Posted by Starck on April 11, 2013

今天 Mac mini 工作機的 MySQL 又出問題了, 所以想把它重新安裝一下…

到官網下載 mysql-5.5.16-osx10.6-x86_64.dmg

安裝前先備份 databases:

安裝 MySQL

安裝後 MySQL 會把程式分別放在以下三個地方:

  • /usr/local/mysql-5.5.16-osx10.6-x86_64 (主程式)
  • /Library/StartupItems/MySQLCOM (用來放置系統啟動時自動執行的 plist 配置檔)
  • /Users/Zmax/Library/PreferencePanes/MySQL.prefPane (系統偏好設定的界面)

因為我的 sql 資料有點大, 所以到 /etc/my.cnf:

max_allowed_packet 設大一點避免資料過大而斷線

把舊的 sql 還原:

完工!

(c) 2017 Starck Lin | powered by WordPress