Tag: mysql

  • Set MySQL to UTF-8

    Change the following in my.cnf
    
    [mysqld]
    default-character-set= utf8
    skip-character-set-client-handshake
    character-set-server= utf8
    collation-server= utf8_general_ci
    init-connect= 'SET NAMES utf8'

    via M’sNOTE  MySQL(デフォルト文字コード)の設定 – Ubuntu9.04.

  • Server upgraded to new Ubuntu 9.04 server

    The website is up, and running on a brand new OS – Ubuntu 9.04 Server. Supercool to configure, has pre-configured LAMP, OpenSSH out-of-the-box.
    Using the UFW was too easy than messing with iptables, or routing.
    Feeling great having refreshed up my home server with a mature OS.

  • MySQL UTF-8

    A very informative page (in Japanese) about MySQL and issues to enable correct UTF-8 data handling with client applications.

    View original post

  • MySQL’s killer feature

    MySQL has a killer feature – you can have a timestamp field with DEFAULT as LOCALTIMESTAMP, so that when you insert a new record, the timestamp field will automatically have current timestamp inserted. But what about when the record is updated? Do you manually have to update the timestamp again? NO – MySQL allows you also specify another default on UPDATE so that whenever you update the record, it will automatically update the timestamp again.


      `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,

    Now, isn’t that a neat feature!