I am trying to figure out how to change MySQL configuration before a Travis CI test run. We are using the "sudo:false" directive, I think to use containers...I'm not the best devops person.
But even when I set sudo to true, I can't restart MySQL after I try to add lines to "/etc/mysql/my.cnf".
So,
- cat "some/directory/my.cnf" | sudo tee -a /etc/mysql/my.cnf
- sudo /etc/init.d/mysql restart
gives me: "start: Job failed to start", but I don't even want to use sudo. For PHP config, I can do something like:
- echo "apc.shm_size=256M" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
but I can't see anything in my home folder about MySQL.
I also know about:
- mysql -e "SET GLOBAL innodb_buffer_pool_size = 512M;"
but the things I want to set give me:
ERROR 1238 (HY000) at line 1: Variable 'innodb_buffer_pool_size' is a read only variable
So, I'm at a loss on how to accomplish changing MySQL configuration on Travis CI, and every internet search and method I've tried has failed me.
innodb_buffer_pool_size
cannot be dynamically changed until MySQL 5.7.5. What version are you using?
Before that version, here are some options:
/etc/my.cnf
(or wherever it is located)[mysqld]
and innodb_buffer_pool_size=512M
; then restart mysqld.--innodb_buffer_pool_size=512M
to the launching of mysqld
.Other "VARIABLES" may, or may not, be dynamically settable. Research each one separately.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With