title: Setting `server-id` variable in MySQL doesn't work
body: <p>I've been trying to set up two databases as master &amp; slave.</p>
  
  <p>I followed the famous guide here:
  <a href="https://dev.mysql.com/doc/refman/5.1/en/replication-howto-existingdata.html" rel="noreferrer">https://dev.mysql.com/doc/refman/5.1/en/replication-howto-existingdata.html</a></p>
  
  <p>But no luck on my slave server,
  The issue I'm having is setting the <code>server-id</code> variable.
  No matter where I define it (I looked into all the possible cnf files that might allow me to define the variable)</p>
  
  <p>I tried to define it like so:</p>
  
  <pre><code>[mysqld]
  server-id = 2
  </code></pre>
  
  <p>I also tried setting it by using SET GLOBAL server_id but obviously, it didn't save the setting.</p>
  
  <p>when I do:</p>
  
  <pre><code>SHOW VARIABLES LIKE 'server_id'
  </code></pre>
  
  <p>It returns</p>
  
  <pre><code>server_id 0
  </code></pre>
  
  <p>Among the cnf files I've looked into are:</p>
  
  <pre><code>etc/mysql/mysql.conf.d/mysqld.cnf
  etc/mysql/mysql.conf.d/mysqld_safe_syslog.cnf
  etc/mysql/conf.d/mysql.cnf
  etc/mysql/debian.cnf
  etc/mysql/mysql.cnf
  usr/my.cnf
  usr/my-new.cnf
  usr/etc/my.cnf
  </code></pre>
  
  <p>My MySQL server is running on Ubuntu.
  And if it matters, I start it by typing:</p>
  
  <pre><code>service mysql start
  </code></pre>
  
  <p>I'd love to know where else I could look to fix this issue.
  Thanks a bunch!</p>
  
  <p>Additional Notes:</p>
  
  <p><strong>MySQL Ignoring the global conf file</strong></p>
  
  <p>I received this warning a couple of times and it disappeared when I returned the chmod to 644 on the etc/mysql folder, although every thing stated above was attempted using both 644 and 777 permissions, with 644 the warning disappears.</p>