MySQL wont start after modifying /etc/my.cnf
You say that you are trying to change the MySQL port from 3306 to 512.  If that is correct, then then problem is that all *nix (Linux, Solaris, AIX, etc) require you to run as root in order to bind to ports below 1024.  

Try running it on port 3307 or something.