title: invalid literal for int() with base 10: 'PORT'
body: <p>I am trying to connect to an RDS instance for a web app project. I am getting this error:</p>
  
  <pre><code>ValueError: invalid literal for int() with base 10: 'PORT'
  </code></pre>
  
  <p>With the traceback:</p>
  
  <pre><code>.conda/envs/src/lib/python3.6/site-packages/sqlalchemy/engine/
  url.py", line 60, in __init__
  </code></pre>
  
  <p>Here is the format of my RDS request</p>
  
  <pre><code>DATABASE_URL: mysql+pymysql://USER:PASSWORD@HOST:PORT/DBNAME
  </code></pre>
  
  <p>I run this in terminal:</p>
  
  <pre><code>export DATABASE_URL=mysql+pymysql://USER:PASSWORD@HOST:PORT/DBNAME
  export HOST=myhost
  export USER=myuser
  export PASSWORD=mypassword
  export DBNAME=mydbname
  export PORT=3306
  
  python create_db.py
  </code></pre>
  
  <p>So my PORT is not reading correctly, and I don't know why. All the research I've done has said that this issue was fixed in Oracle last year, but I'm using MySQL.</p>
  
  <p>Here are my create_db.py and schema.py for RDS</p>
  
  <pre><code>#  create_db.py
  from schema import db
  if __name__=='__main__':
  # create a new table scheme as defined in the schema script
  db.create_all()
  </code></pre>
  
  <hr>
  
  <pre><code># schema.py
  from flask import Flask
  from flask_sqlalchemy import SQLAlchemy
  import os
  
  class Config(object):
  """using the global variable saving in command line"""
  SECRET_KEY = os.environ.get('SECRET_KEY') or 'secret-key'
  SQLALCHEMY_DATABASE_URI = os.environ.get('DATABASE_URL')
  SQLALCHEMY_TRACK_MODIFICATIONS = False
  
  application = Flask(__name__)
  application.config.from_object(Config)
  db = SQLAlchemy(application)
  
  class Patient(db.Model):
      __tablename__ = 'Patient'
  
      id = db.Column(db.Integer, primary_key=True,autoincrement=True)
      ...
  def __repr__(self):
      return '&lt;User %r'&gt; % self.id
  </code></pre>