Hi,
MySQL is almost compatible but not completely.
The two main differences are how 4.1.x handles character sets and how MySQL stores passwords in the user table (the hashing algorithm changed).
So if you just upgrade MySQL and import the complete database, there's no way to authenticate against MySQL unless you compiled or started MySQL with special switches.
MySQL uses a completely different client protocol (mysqli functions of PHP). The mysql_???? functions still work if you want to but the mysqli functions are recommended if you have MySQL 4.1.7.
So just upgrading MySQL 4.1.7 isn't possible without some actions one could think of as "hacks".
It's at least not a simple task.
Thomas