SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Hybrid View

  1. #1
    Non-Member
    Join Date
    Jan 2004
    Location
    Seattle
    Posts
    4,328
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Can someone explain COLLATION in plain English?

    After a recent computer crash, I installed a new software package with Apache, PHP and MySQL. I was pleased to see that some of my programs were upgrades. Everything was working fine until I tried to publish some of my database tables online just minutes ago got an unfamiliar error:

    #1064 - You have an error in your SQL syntax. Check
    the manual that corresponds to your MySQL server
    version for the right syntax to use near 'collate
    latin1_general_ci NOT NULL default '',
    `IDRealm` varc

    I looked up "collation" on MySQL's website, but it doesn't yet make sense to me. What's it all about, and - more important - how do I solve this new error MySQL created for me?

    Also, I noticed that when I create tables, I no longer
    have a choice for InnoDB, so I've been choosing
    MyISAM. If I leave it at default, what kind of table
    would I get?

    Actually, I'm leaning towards MyISAM anyway. I thought
    InnoDB were generally considered superior, but when my
    computer crashed, I lost most of my InnoDB tables but
    none of my MyISAM tables.

    Thanks.

  2. #2
    SitePoint Wizard stereofrog's Avatar
    Join Date
    Apr 2004
    Location
    germany
    Posts
    4,324
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    In plain (hopefully "not-so-bad" ) english collation is a sorting rule. It tells mysql how strings should be sorted. This isn't the same as charset (codepage, language), because some charsets can have more than one collation. The support of collations was first added in version 4.1, so it seems you have downgraded your local mysql or your "online" mysql is older than 4.1. Try installing the same version on both sides.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •