Saturday, April 9, 2011

Minimal MariaDB configuration on Windows for Express Web Development

(continued from phosphorescence: Install MVC 3 with VWDExpress and MariaDB)

Deploy my.ini

In MariaDB installation directory, there are 5 4 templete files for my.ini
  • my-huge.ini
  • my-innodb-heavy-4G.ini
  • my-large.ini
  • my-medium.ini
  • my-small.ini
MariaDB Windows version loads my.ini from "MariaDB installation directory\data\my.ini". one of these path.
  1. C:\Windows\my.ini
  2. C:\Windows\my.cnf
  3. C:\my.ini
  4. C:\my.cnf
  5. MariaDB installation directory\my.ini
  6. MariaDB installation directory\my.cnf
So you just rename from one of above list to one fo below list.

Edit my.ini

Normally, any recent web frameworks are designed for RDBs with having UTF8 encoding. It's too for Rails, ASP.NET MVC3, Django, and so forth. And RDB management tool is important for developing with those web frameworks. So we should edit deployed my.ini both for UTF8 and for MySQL Workbench (It's ready too for MariaDB).

Open deployed my.ini, and add these settings on each sections.
# ........
[client]
# ........
character-set-server=utf8
# ........
[mysqld]
# ........
character-set-server=utf8
collation-server=utf8_general_ci
log-output=TABLE
# ........
[mysqldump]
# ........
character-set-server=utf8
# ........
[mysql]
# ........
character-set-server=utf8
# ........

Launch MariaDB as Windows service

Just type like this:
> mysqld --install
Windows Service named "MySQL" is created. Open the service menu, and check that "MySQL" service is there and started. If not, start "MySQL" service.
After the service started, initialize MariaDB's root password.
> mysqladmin -u root password "MariaDB's root password"

Initialize MySQL Workbench

Launch MySQL Workbench, Luanch [Edit]-[Preferences...] Menu. In Administrator tab, set your mysqldump.exe and mysql.exe.
After setting preferences, click "New Server instance" menu.
And set the your MariaDB information with Wizard menu. In "Path to configuration file" textbox, you choose deployed my.ini.
At last, right click the created "Server Administration" menu, launch server administration with choosing [Manage Instance].
(Conitinue to phosphorescence: Prepare MVC 3 with VWDExpress and MariaDB)

1 comment:

Anonymous said...

Very useful post for me! Thanks a lot

Post a Comment