midgard-project.org update

Posted on 2006-10-06 22:01:07 EEST.


Today I updated Midgard setup on the host which serves www.midgard-project.org website. Unfortunatelly I couldn't use datagard as remotes database server doesn't allow login in as database administrator, so update has been made step by step manually.
A good news is the fact that debian packages was used to update Midgard environment.

If you need to update remote database and can not use datagard , try this script:

Database update

#! /bin/sh
. /usr/share/midgard/datagard/datagard.conf
# Set default initial values
_DATABASE_NAME="midgard"
_DATABASE_HOST="127.0.0.1"
_MGD_DB_USER="midgard"
_MGD_DB_PASS="midgard"
_SG_USER="admin"
_SG_PASS="password"

mgd_set_config_data MGD_DB_ACTION Update
mgd_set_config_data MYSQL_ADMIN_USER root
mgd_set_config_data MYSQL_ADMIN_PASS ""
mgd_set_config_data MGD_DB_HOST $_DATABASE_HOST
mgd_set_config_data MGD_DB_USER_NAME $_MGD_DB_USER
mgd_set_config_data MGD_DB_USER_PASS $_MGD_DB_PASS
mgd_set_config_data MGD_DB_NAME $_DATABASE_NAME
mgd_set_config_data MGD_SG_USER_NAME $_SG_USER
mgd_set_config_data MGD_SG_USER_PASS $_SG_PASS
mgd_set_config_data MGD_UPDATE_DB $_DATABASE_NAME
mgd_set_config_data MGD_DB_CONNECT_HOST $_DATABASE_HOST

mysqlcmd="mysql --host=$_DATABASE_HOST --user=$_MGD_DB_USER --password=$_MGD_DB_PASS"

mgd_update_db
mgd_update_db_for_utf


This is of course example , and you might want to tweak it for particular needs.

A few nice features I discovered (oops , I wrote it :) after updating midgard:

  • All SQL errors are reported to apache error log file whithout any need to change apache log level and without any need to reboot. Took me long while to find apache main error log , but at last I was nicely surprised.
  • Schema validation is much much more better than this one wich exists in 1.7 branch.
Starting apache 1.3 web server...midgard-core (pid:30299):(WARNING):
Wrong node name 'propetty' 
in '/usr/share/midgard/schema/org_openpsa_core.xml' on line 137

Back

Layout Copyright © 2006 Finnish Teleservice Center Ltd Oy - Site Powered by Midgard CMS