I faced that same problem:
ERROR 1238 (HY000): Variable 'innodb_buffer_pool_size' is a read only variable
Then I notice I wrote [mysqly]
wrongly at the top, and that's why my.cnf was not working properly. I change it to [mysqld]
and restart MySQL, then everything is working perfectly.