Hardware and performance

I modified /etc/my.cnf to optimize my SQL Queries - led to Plesk problem. So how can I optimize MySQL safely?