by Patrick Chen.
I figured out the solution to my first question: I forgot to set the prefix while running the Database Migration tool, that's why the migrated database was not accepted - the prefixes on config.php did not match the migrated database. I've now successfully migrated a near empty devlopment Moodle site's database from postgresql to mysql with the migrate.php script.
However, I've run into a different problem with migrating our production Moodle site's database that's much bigger. Now, the migrate.php script fails at the same place everytime trying to migrate the production database from postgresql to mysql. The error in PHP is
[25-Mar-2016 13:13:30 America/Los_Angeles] Potential coding error - active database transaction detected when disposing database:
* line 126 of \lib\dtl\database_importer.php: call to moodle_database->start_delegated_transaction()
* line 79 of \lib\dtl\database_mover.php: call to database_importer->begin_database_import()
* line 145 of \lib\dtl\database_exporter.php: call to database_mover->begin_database_export()
* line 85 of \admin\tool\dbtransfer\locallib.php: call to database_exporter->export_database()
* line 187 of \admin\tool\dbtransfer\cli\migrate.php: call to tool_dbtransfer_transfer_database()
The migration is smooth all the way up to the 'user' table, and fails there everytime. On the mysql database, preceding tables are all there. The 'user' table has about 450 entries on the postgresql production database, and on the incomplete/failed mysql destination database there are about 390 entries. In the Command Line where I run migrate.php, the error displayed is
Copying table timezone
Done
Copying table user
!!! Error writing to database !!!
I've also tried Maintenace Mode and also Stopping the site completely in IIS.
Any insight is appreciated, thank you.