Why ".my.cnf" file is empty?
The ~/.my.cnf file is usually used for client options (for example changing the default port or host).

mysqld will likely start as a different user and will not read your .my.cnf file.  It is recommended to set these options in /etc/my.cnf instead.