title: Username Failures When Connecting SQLAlchemy to MySQL
body: <p>I'm attempting to connect a python web application to a local database via SQLAlchemy.</p>
  
  <p>I have configured the following connection string:</p>
  
  <pre><code>sqlalchemy.url = mysql+mysqlconnector://root:root@localhost:3306/db_mother
  </code></pre>
  
  <p>When I use the above, I get the following error (after a long stack trace):</p>
  
  <blockquote>
    <p>sqlalchemy.exc.ProgrammingError: (ProgrammingError) 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO) None None</p>
  </blockquote>
  
  <p>When I change the connection string to this:</p>
  
  <pre><code>sqlalchemy.url = mysql+mysqlconnector://ripley:amanda@localhost:3306/db_mother
  </code></pre>
  
  <p>I get an expected error, because that user is not configured with that password in the db:</p>
  
  <pre><code>sqlalchemy.exc.ProgrammingError: (ProgrammingError) 1045 (28000): Access denied for user 'ripley'@'localhost' (using password: YES) None None
  </code></pre>
  
  <p>So, in the first case I have a valid db user and password (which I can use to connect via command line or SequelPro), and it says I'm not using a password. In the second case it seems to understand that there is a password. Why does it not have this understanding in the first place?</p>
  
  <p>I am using <code>python3</code>, <code>sqlalchemy</code>, <code>mysql-connector-python</code> and <code>pyramid</code>. It's also of note that if I strip the password from the root user, it works fine.</p>