How to Add to MySQL Configuration on Travis CI When Not Sudo : <p>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. </p>

<p>But even when I set sudo to true, I can't restart MySQL after I try to add lines to "/etc/mysql/my.cnf". </p>

<p>So,</p>

<pre><code>  - cat "some/directory/my.cnf" | sudo tee -a /etc/mysql/my.cnf
  - sudo /etc/init.d/mysql restart
</code></pre>

<p>gives me: "start: Job failed to start", but I don't even want to use sudo. For PHP config, I can do something like:</p>

<pre><code>  - echo "apc.shm_size=256M" &gt;&gt; ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
</code></pre>

<p>but I can't see anything in my home folder about MySQL. </p>

<p>I also know about:</p>

<pre><code>  - mysql -e "SET GLOBAL innodb_buffer_pool_size = 512M;"
</code></pre>

<p>but the things I want to set give me:</p>

<pre><code>  ERROR 1238 (HY000) at line 1: Variable 'innodb_buffer_pool_size' is a read only variable
</code></pre>

<p>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. </p>
