There should be server.cnf file in folder /etc/my.cnf.d. Open this file in your text editor and search for [mysqld]. Add the following highlighted line below [mysqld].
Save the file and restart the MySQL server either from the CentOS web panel or command line. This will set the innodb_buffer_pool_size to 2gb.