Skip to content

MySQL database setup

bobbyappdev edited this page Apr 15, 2013 · 3 revisions

The purpose of this page is to document a standard way of setting up MySQL database for the appdev framework. The framework is intended to be multilingual, so it should use the utf8 character set.

For more information, see the MySQL documentation

Setting up a new database

CREATE DATABASE db_name
    DEFAULT CHARACTER SET utf8
    DEFAULT COLLATE utf8_general_ci

Checking an existing database

USE your_database_of_interest;
show variables like "character_set_database";
show variables like "collation_database";

Altering an existing database

ALTER DATABASE your_database_of_interest
    DEFAULT CHARACTER SET utf8
    DEFAULT COLLATE utf8_general_ci

Clone this wiki locally