innodb_buffer_pool_size not changed
Ok, thanks this answer I figured out that I needed to put the config WITHIN [mysqld] block in my.cnf to take effect. 

My mistake was that I just had appended the commands at the end of my.cnf file.

Then at mysql restart I encounterd

InnoDB: Error: log file ./ib_logfile0 is of different size 0 5242880 bytes


To resolve this error, I needed to deleted log 


  rm -f /var/lib/mysql/ib_logfile[01]


and restart as Rolando told here.