Quantcast
Channel: Active questions tagged python - Stack Overflow
Viewing all articles
Browse latest Browse all 13981

Table doesn't exist trying to connect to RDS mysql Database

$
0
0

I am having trouble connecting to the RDS database I created from the Elastic beanstalk console. The app is deployed ok, but I get an internal server error from the webpage every time I try using the database in the app. For example, if I try to add a user.

Here is one of the logs

pymysql.err.ProgrammingError: (1146, "Table 'ebdb.note' doesn't exist")
    SQLALCHEMY_DATABASE_URI = ("mysql+pymysql://"+ os.environ['RDS_USERNAME'] +":" + os.environ['RDS_PASSWORD']+"@" + os.environ['RDS_HOSTNAME'] +":3306/ebdb")

config.py

from dotenv import load_dotenvload_dotenv()  # Load environment variables from .env fileclass Config:    SECRET_KEY = os.getenv('SECRET_KEY')        SQLALCHEMY_DATABASE_URI = ("mysql+pymysql://"+ os.environ['RDS_USERNAME'] +":" + os.environ['RDS_PASSWORD']+"@" + os.environ['RDS_HOSTNAME'] +":3306/ebdb")    SESSION_PERMANENT = False 

I have the RDS database set to publicly accessible.


Viewing all articles
Browse latest Browse all 13981

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>