I'm new to Linux. just studying php/mysql development. On windows I kept Apache, PHP, Mysql, PgSQL directories in one folder on SEPARATE DRIVE, like this:
D:\server
\mysql
\apache
\php
So - If I would to reinstall Windows - all I would have to do is start mysql and httpd services - and that's that. quick and easy. The same like XAMPP, except I don't need 20 extra apps that xammp give you.
I would love to do the same in Ubuntu. So I would keep apache,mysql,php on separate drive and start them whenever I want to (init.d or upstart to start them automatically).
so - the structure would be:
/media/storage/server
/media/storage/server/mysql
/media/storage/server/apache
/media/storage/server/php
I got everything compiled and setup aside from config files.
The problem is:
I want all config files to be in one place as well. I mean http.conf -in apache folder. my.cnf - in mysql folder
so - Question: How do I make MySQL load configuration file not from /etc/my.cnf, but from another arbitrary location. couldn't find this info anywhere..:(
important:
1)it's not a production server! It's just for someone who studyis web development and linux and doesn't want to keep reinstalling and reconfiguring server when he changes distros. 2) I know it's against Linux hierarchical standards. 3) I now about Ubuntu's tasksel lamp-server and/or XAMPP easinness:)