Things to keep in mind while editing Mysql "my.cnf" file Today I tried to boost mysql's(installed in my system Ubuntu 14.04) performance as I have many sites(PHP/Magento) installed in my system which relies on mysql as database server, but when I edited the lines like "query_cache_size", "query_cache_type" and other lines(only lines with numeric values which I increased), but instead of speeding it up, it decreased mysql's performance and also it timed-out when I tried to open multiple different pages in browser tabs.

So I need to know what to keep in mind when I edit the "my.cnf" the next time so it doesn't decrease performance but boost it.

What is the relation between those values like "query_cache_size", "max_connections" etc.? Are they inter-dependent ?
There are a lot of inter-dependencies.  Casual use of the Query cache can speed up some queries.  Busy systems tend to be slowed down by the QC.

Overcommitting RAM is deadly for performance.  Here is a discussion of that, and some of the settings.

32bit system with 8GB of RAM ! -- Is that a 32-bit OS?  Or a 32-bit MySQL on a 64-bit OS?  If the former, then 4GB is totally idle.  In either case, MySQL is constrained as if it has only 4GB.

What kinds of things slowed down when you changed what settings?  We can probably explain what happened if you give us some details.