title: How do you install MySQL for Flask?
body: <p>I am using OS X Yosemite, Python 3.6.2 and basically went through every single stackoverflow post regarding installation of MySQL into flask.</p>
  
  <p>I've tried pip install <code>flask-mysqlDB</code> which gives me the error</p>
  
  <pre><code>Collecting flask-mysqldb
    Using cached Flask-MySQLdb-0.2.0.tar.gz
  Requirement already satisfied: Flask&gt;=0.10 in ./venv/lib/python3.6/site-packages (from flask-mysqldb)
  Collecting mysqlclient (from flask-mysqldb)
    Using cached mysqlclient-1.3.10.tar.gz
      Complete output from command python setup.py egg_info:
      /bin/sh: mysql_config: command not found
      Traceback (most recent call last):
        File "&lt;string&gt;", line 1, in &lt;module&gt;
        File "/private/var/folders/c4/y49xcq6j6jlcr_8yyckm75th0000gp/T/pip-build-32rvmlzy/mysqlclient/setup.py", line 17, in &lt;module&gt;
          metadata, options = get_config()
        File "/private/var/folders/c4/y49xcq6j6jlcr_8yyckm75th0000gp/T/pip-build-32rvmlzy/mysqlclient/setup_posix.py", line 44, in get_config
          libs = mysql_config("libs_r")
        File "/private/var/folders/c4/y49xcq6j6jlcr_8yyckm75th0000gp/T/pip-build-32rvmlzy/mysqlclient/setup_posix.py", line 26, in mysql_config
          raise EnvironmentError("%s not found" % (mysql_config.path,))
      OSError: mysql_config not found
  
      ----------------------------------------
  Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/c4/y49xcq6j6jlcr_8yyckm75th0000gp/T/pip-build-32rvmlzy/mysqlclient/
  </code></pre>
  
  <p>none of the <code>sudo apt-get</code> commands work because of my Mac version. Installed homebrew by <code>brew install python</code> and I am still unable to use the <code>sudo apt-get</code> command.</p>
  
  <p>My pip list is</p>
  
  <pre><code>click (6.7)
  Flask (0.12.2)
  itsdangerous (0.24)
  Jinja2 (2.9.6)
  MarkupSafe (1.0)
  mysql-connector-python-rf (2.2.2)
  mysqlclient (1.3.10)
  pip (9.0.1)
  setuptools (28.8.0)
  virtualenv (15.1.0)
  Werkzeug (0.12.2)
  </code></pre>
  
  <p>Now I have an error saying:</p>
  
  <pre><code>Collecting MySQL-python
    Using cached MySQL-python-1.2.5.zip
      Complete output from command python setup.py egg_info:
      Traceback (most recent call last):
        File "&lt;string&gt;", line 1, in &lt;module&gt;
        File "/private/var/folders/c4/y49xcq6j6jlcr_8yyckm75th0000gp/T/pip-build-n8on2g_t/MySQL-python/setup.py", line 13, in &lt;module&gt;
          from setup_posix import get_config
        File "/private/var/folders/c4/y49xcq6j6jlcr_8yyckm75th0000gp/T/pip-build-n8on2g_t/MySQL-python/setup_posix.py", line 2, in &lt;module&gt;
          from ConfigParser import SafeConfigParser
      ModuleNotFoundError: No module named 'ConfigParser'
  
      ----------------------------------------
  Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/c4/y49xcq6j6jlcr_8yyckm75th0000gp/T/pip-build-n8on2g_t/MySQL-python/
  </code></pre>