Maintenance

  • Home
  • Log in
  • « Documentation on installing/configuring Delphi 2005
  • UTF-8 XML & Text serializers on lettuce Cocoon »

MySQL info - create DBs/InnoDB/charsets etc.

Posted by gregster on 06 Feb 2007 in Servers, Documentation
Creating a DB in MySQL (phpMyAdmin) 1) make sure that the collation type is set to utf8_unicode_ci 2) tables should be created in this format. (Note that the engine is InnoDB not MyISAM. MySQL will want to create MyISAM tables. This is OK, but we've settled on InnoDB for its more sophisticated transaction locking and journaling.)
CREATE TABLE `foo` (
  `field1` varchar(55) collate utf8_unicode_ci NOT NULL,
  `field2` varchar(55) collate utf8_unicode_ci NOT NULL,
  `field3` varchar(55) collate utf8_unicode_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
3) dumps from phpMyAdmin will export tables as latin1 because of the way that MySQL was configured when being built. See here for documentation. To restore/import, first change all refs in the .sql dump file from latin1 to utf8. 4) phpMyAdmin does not seem to set a BOM on the files it creates (this is just FYI - we aren't sure if it matters). It (phpMyAdmin may also be encoding the characters as ANSI (this is Martin's experience on Windows. It seems to give me utf8 on Linux, but ...).
This entry was posted by Greg and filed under Servers, Documentation.

Maintenance

This blog is the location for all work involving software and hardware maintenance, updates, installs, etc., both routine and urgent.
  • Home
  • Recently
  • Archives
  • Categories

Search

Categories

  • All
  • Announcements
  • Hit by a bus
  • Labs
    • Activity log
    • Documentation
  • Notes
  • R & D
    • Activity log
    • Documentation
  • Servers
    • Activity log
    • Documentation
  • Tasks

All blogs

  • Academic
  • AdaptiveDB
  • Admin
  • Announcements
  • CanMys
  • Cascade
  • CGWP
  • ColDesp
  • Depts
  • DVPP
  • Endings
  • HCMC Blogs
  • Landscapes
  • LEMDO
  • Linguistics
  • Maint
  • LondonMap
  • Mariage
  • MoM
  • Moses
  • Pro-D
  • Projects
  • ScanCan
  • HumsSites
  • Wendat

This collection ©2025 by admin • Help • Multiple blogs solution