Hi!
This issue was discussed in many threads in these forums, pls make a few searches.
As a brief answer : Yes, you can upgrade from v4.0.22 to 4.1.12, couple of contributors like gregswallow and SharedMedia has done great work for MySQL-upgrades.
Good luck