0

I have written a python code which extracts some information from news sites and then creates a pandas dataframe. This dataframe is required to be loaded into one mysql table.

I tested my code in my local system. But when I am running at client's server I am facing issue because the mysql user password contains '@' symbol. The below code is throwing errowr:

engine = create_engine("mysql+pymysql://{}:{}@{}/{}".format(DB_USER,DB_PASSWORD,DB_SERVER,DB_NAME))

The error message is: sqlalchemy.exc.OperationalError: (pymysql.err.OperationalError) (2003, "Can't connect to MySQL server on 'P!uE^s5c^@127.0.0.1' ([Errno -2] Name or service not known)")

Please help me to resolve this issue. Password is w2@P!uE^s5c^

Thanks, Krishna

0 Answers0