title: Installing Mysql 2 gem fails
body: <p>I am trying to install mysql2 (version <strong>0.4.5</strong>) and I am using <strong>Rails 5.0.2</strong>, Ruby 2.3.1 </p>
  
  <p>I've already installed mysql server using homebrew (version 8.0.11)and started mysql  as:</p>
  
  <pre><code>brew install mysql
  brew services start mysql
  </code></pre>
  
  <p><strong>Gemfile.rb</strong></p>
  
  <pre><code>gem 'mysql2'
  </code></pre>
  
  <p>When I try installing gem mysql2 I am getting the following error</p>
  
  <pre><code>Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
  
      current directory: /Users/gomathi/.rvm/gems/ruby-2.3.1@connector/gems/mysql2-0.4.5/ext/mysql2
  
  creating Makefile
  
  current directory: /Users/gomathi/.rvm/gems/ruby-2.3.1@connector/gems/mysql2-0.4.5/ext/mysql2
  make "DESTDIR=" clean
  
  current directory: /Users/gomathi/.rvm/gems/ruby-2.3.1@connector/gems/mysql2-0.4.5/ext/mysql2
  make "DESTDIR="
  compiling client.c
  In file included from client.c:1:
  In file included from ./mysql2_ext.h:41:
  ./result.h:24:3: error: unknown type name 'my_bool'
    my_bool *is_null;
    ^
  ./result.h:25:3: error: unknown type name 'my_bool'
    my_bool *error;
    ^
  client.c:507:3: error: use of undeclared identifier 'my_bool'
    my_bool res = mysql_read_query_result(client);
    ^
  client.c:509:19: error: use of undeclared identifier 'res'
    return (void *)(res == 0 ? Qtrue : Qfalse);
                    ^
  client.c:828:3: error: use of undeclared identifier 'my_bool'
    my_bool boolval;
    ^
  client.c:859:7: error: use of undeclared identifier 'boolval'
        boolval = (value == Qfalse ? 0 : 1);
        ^
  client.c:860:17: error: use of undeclared identifier 'boolval'
        retval = &amp;boolval;
                  ^
  client.c:863:10: error: use of undeclared identifier 'MYSQL_SECURE_AUTH'; did you mean 'MYSQL_DEFAULT_AUTH'?
      case MYSQL_SECURE_AUTH:
           ^~~~~~~~~~~~~~~~~
           MYSQL_DEFAULT_AUTH
  /usr/local/Cellar/mysql/8.0.11/include/mysql/mysql.h:188:3: note: 'MYSQL_DEFAULT_AUTH' declared here
    MYSQL_DEFAULT_AUTH,
    ^
  client.c:864:7: error: use of undeclared identifier 'boolval'
        boolval = (value == Qfalse ? 0 : 1);
        ^
  client.c:865:17: error: use of undeclared identifier 'boolval'
        retval = &amp;boolval;
                  ^
  client.c:896:38: error: use of undeclared identifier 'boolval'
          wrapper-&gt;reconnect_enabled = boolval;
                                       ^
  client.c:1285:38: error: use of undeclared identifier 'MYSQL_SECURE_AUTH'; did you mean 'MYSQL_DEFAULT_AUTH'?
    return _mysql_client_options(self, MYSQL_SECURE_AUTH, value);
                                       ^~~~~~~~~~~~~~~~~
                                       MYSQL_DEFAULT_AUTH
  /usr/local/Cellar/mysql/8.0.11/include/mysql/mysql.h:188:3: note: 'MYSQL_DEFAULT_AUTH' declared here
    MYSQL_DEFAULT_AUTH,
    ^
  12 errors generated.
  make: *** [client.o] Error 1
  
  make failed, exit code 2
  </code></pre>
  
  <p>How can I get the job done?. </p>