domain specific my.cnf

Hi all,

I think I know the answer, but posting it here in case there is a solution.

I have virtualmin pro running on Ubuntu 16.04. Most things have been fine, but I have a user with joomla! who has a problem with the new mysql 5.7.
Mysql 5.7 enforces strict mode. The most common way to reduce security and let your site run is to modify my.cnf (or one of the other config files it reads).
I did this, but my whole server now runs in this “less than secure” mode.

I saw in the documentation for mysql it supports reading ~/.my.cnf. I believe that would refer to the user account of the process that runs the mysql service.

On the chance that I’m wrong, though, is there a mechanism in place for using a my.cnf file for each domain, similar to having custom php.conf files?

Thanks,

  • Gary

Is it possible? Well yes and no, depends how you look at the things. To have separate my.cnf you should have more than one instance of MySQL. That means you would need to create my2.cnf (same folder as default my.cnf) and change port, pid and socket. Then you must have separate log files for each MySQL, consumption of RAM need to be taken into calculation, if HHD you must switch to SSD to not suffer from I/O limits, and so on…

Not easy task to do but is possible. Still i think forum is not proper place to ask for a guide because too many things can go wrong up to the point you could irreversible crash your entire server. Maybe the best solution would be to pay a SysAdmin to do the job and not worry if next morning your server will be up and running.

Be smart, regardless who will do the job make full backup of all your domains/virtual servers and check if that backup is actually working.

Forgot to mention, some changes could be different or could be avoided but not knowing what you have there, server resources and their usage its hard to predict what you will need, e.g. if the server (VPS) is good, you have dedicated server or your websites are low on resource consumption you could use/stay with HDD.