Moodle MySQL and Login problem

We have a rather strange and urgent problem with moodle CMS and mysql since moving from one host to another.

Moodle works normally for guests and you can log into the front page as an admin but the moment we try to navigate we get logged out. In addition the moment you click turn editing on you immediately get logged out.

If we rebuild the site using the moodle installer all works fine (The installer creates a new database in INNODB utf8_unicode_ci.  but the moment we try to restore our database it all goes belly up again.

When we look at the database structure phpmyadmin the restored database is in MyISAM  format and Utf8_general_ci which i presume is the route of our problem.

We have tried converted the table structures to INNODB by exporting g the database and changing in notepad and reimporting (dropping the original database) but still no joy.  

Short of editing the collation setting for each table is there a quick way of changing the collation setting for all tables.

Or am i up the wrong tree altogether, any other suggestions?

Moodle 2.03
Who is Participating?
johanntagleConnect With a Mentor Commented:
Strange indeed.  I assume moodle versions in old and new hosts are identical.  Can you try importing the backup to another database then copying the data over to the fresh moodle install?  Something like:

Delete from freshdb.table1:
Insert into freshdb.table1 select * from olddb.table1;

I know there will be a lot of tables, but maybe you can create a script using the output of SHOW TABLES.
nazateamAuthor Commented:
Thanks for the help, kinda told me what i was expecting.

Oh well that what happens when you get someone else to migrate a website for you. so wish i had done it myself now!.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.