I have not tried to do any of what you request info on but if I was to have a go I would look first at the mysql\bin\my.cnf
file (or it may just be named my and look like a linked file
) - to read/edit the just my
file, simply drag it into an open text editor window.
Your main concerns will be port conflicts as both versions would use 3306 so perhaps changing one or the other versions to a different port number is a start - this may not be necessary because you would not normally run both at the same time perhaps.
Under the MySQL Server section you will find path definitions.
So to change the datadir
so it reflects the same in both versions may be the answer to your shared data issue but keep in mind mySQL database compatibility issues as v5 and v4 are often not compatible and need to be adjusted in phpMyAdmin when importing or exporting from one version to another.
As I said, I have not attempted this and so I stand to be corrected, but the above info may help seed your own ideas for experimenting with this issue - it would be essential, IMHO, to make full backups first of both installations so, if needs be, you can easily revert to at least one working version, preferably the XAMPP instance, also your databases would still be safe.
So in conclusion, multiple instances, and/or alternative version other than those included in XAMPP, of both MySQL and phpMyAdmin are possible and are determined by configuration, unlike PHP which is a compiled module of Apache and as such is dependent on Apache in XAMPP but even they can easily be switched between php 4 and php 5 using the included batch file.
After compiling this post I decided to do some searching via Google about this multiple instance issue and found lots of info including a couple of links that seem to confirm that multiple instance are possible:
Multiple MySQL services running on the same machine
Do you run multiple servers on Windows?
Both from this Google search
that you may refine the keywords to your liking and for possible different results.
I hope this post will be some help in your decision making and good luck with it.
Please post back if you get this idea working so others may benefit from your new found knowledge.