I'll answer that in a more general way - looking a bit at the whole "Unix learning experience".
In your example you use two tools, and see the language is similar. It just unclear when to use what exactly. Of course you can expect there is a clear structure, so you ask us to explain that.
The case with the space around
= is only and example - there are lot's of similar-but-bot-quite cases.
There has to be a logic in it, right?!
The rules how to write code for some tool, shell, database etc only depend on what this particular tool requires.
That means that the tools are completely independent, technically. The logical relation that I think you expect simply does not exist.
The obvious similarity of the languages you are seeing are not part of the programm implementation. The similarity exist because developers had agreed how to do it when they wrote it down for a particular program. But humans can agree only partially.
The relation you are seeing is a cultural thing - it's neither part of the implementation, nor in the definition of the language.
So, now that we have handeled the theory, what to do in practise?
A big step is to accept that the consistency you expected does not exist - which is much easier when understanding the reasons - I hope the theory part helps with this.
If you have two tools, that do not use the same configuration language (eg. both bash scripting), knowing the details of the syntax of one does not help much with understanding the other;
So, indeed, you will have to look up details independently. Make sure you know where you find the reference documentation for each.
On the positive side, there is some consistency where you did not expect it: in the context of a single tool (or different tools using the same language), you can be fairly sure the syntax is consistent.
mysql example, that means you can assume that all lines have the same rule. So the rule is "space before and after
= is not relevant".
There are wide differences in how hard it is to learn or use the configuration- or scripting language of a tool.
It can be some like "List foo values in cmd-foo.conf, one per line.".
It can be a full scripting language that is used elsewhere too. Then you have a powerful tool to write configuration - and in some cases that's just nice, in others you will really need that.
Complex tools, or large famillies of related tools sometimes just use very complex special configuration file syntax - (some famous examples are
Others use a general scripting language as base, and extend that language to support the special needs, some times in complex ways, as the language allows. That would be a very specific case of a domain-specific language (DSL).