Posts

Showing posts from November, 2011

Upgrade moodle 1.9+ to 2.0+

there are 2 way how to upgrade: 1. Using php script. Copy this script and save to convertdata.php. Save this script/file to folder moodle. Make sure you change database's name, username and password mysql to the correct one. If your database size to big, please read the comment in the script. <?php // please increase max execution time to 300, example max_execution_time = 300 //mysql_connect("localhost","db_user","db_password"); mysql_connect("localhost","root","root"); //mysql_select_db("db_name"); $dbname=mysql_select_db("xsmachdb"); // convert database to format utf8_bin // ALTER DATABASE `database-name` DEFAULT CHARACTER SET utf8 COLLATE utf8_bin echo "------------convert database to format utf8-bin -------------"; mysql_query("ALTER DATABASE $dbname DEFAULT CHARACTER SET utf8 COLLATE utf8_bin"); // convert all table $res = mysql_query("SHOW TABLES"); while ($...