Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mysql issue Sorry, unexpected error: (_mysql_exceptions.OperationalError) (1045, "Access denied for user 'get5'@'localhost' (using password: YES)") #166

Open
drkamine opened this issue Sep 2, 2019 · 2 comments

Comments

@drkamine
Copy link

drkamine commented Sep 2, 2019

hello , i try to install with the same step but i have an error with mysql
manager.run()
File "/var/www/get5-web/venv/local/lib/python2.7/site-packages/flask_script/init.py", line 412, in run
result = self.handle(sys.argv[0], sys.argv[1:])
File "/var/www/get5-web/venv/local/lib/python2.7/site-packages/flask_script/init.py", line 383, in handle
res = handle(*args, **config)
File "/var/www/get5-web/venv/local/lib/python2.7/site-packages/flask_script/commands.py", line 216, in call
return self.run(*args, **kwargs)
File "/var/www/get5-web/venv/local/lib/python2.7/site-packages/flask_migrate/init.py", line 235, in upgrade
command.upgrade(config, revision, sql=sql, tag=tag)
File "/var/www/get5-web/venv/local/lib/python2.7/site-packages/alembic/command.py", line 174, in upgrade
script.run_env()
File "/var/www/get5-web/venv/local/lib/python2.7/site-packages/alembic/script/base.py", line 397, in run_env
util.load_python_file(self.dir, 'env.py')
File "/var/www/get5-web/venv/local/lib/python2.7/site-packages/alembic/util/pyfiles.py", line 93, in load_python_file
module = load_module_py(module_id, path)
File "/var/www/get5-web/venv/local/lib/python2.7/site-packages/alembic/util/compat.py", line 79, in load_module_py
mod = imp.load_source(module_id, path, fp)
File "migrations/env.py", line 88, in
run_migrations_online()
File "migrations/env.py", line 72, in run_migrations_online
connection = engine.connect()
File "/var/www/get5-web/venv/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 2018, in connect
return self._connection_cls(self, **kwargs)
File "/var/www/get5-web/venv/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 72, in init
if connection is not None else engine.raw_connection()
File "/var/www/get5-web/venv/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 2104, in raw_connection
self.pool.unique_connection, _connection)
File "/var/www/get5-web/venv/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 2078, in _wrap_pool_connect
e, dialect, self)
File "/var/www/get5-web/venv/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1405, in _handle_dbapi_exception_noconnection
exc_info
File "/var/www/get5-web/venv/local/lib/python2.7/site-packages/sqlalchemy/util/compat.py", line 202, in raise_from_cause
reraise(type(exception), exception, tb=exc_tb, cause=cause)
File "/var/www/get5-web/venv/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 2074, in _wrap_pool_connect
return fn()
File "/var/www/get5-web/venv/local/lib/python2.7/site-packages/sqlalchemy/pool.py", line 318, in unique_connection
return _ConnectionFairy._checkout(self)
File "/var/www/get5-web/venv/local/lib/python2.7/site-packages/sqlalchemy/pool.py", line 713, in _checkout
fairy = _ConnectionRecord.checkout(pool)
File "/var/www/get5-web/venv/local/lib/python2.7/site-packages/sqlalchemy/pool.py", line 480, in checkout
rec = pool._do_get()
File "/var/www/get5-web/venv/local/lib/python2.7/site-packages/sqlalchemy/pool.py", line 1151, in _do_get
return self._create_connection()
File "/var/www/get5-web/venv/local/lib/python2.7/site-packages/sqlalchemy/pool.py", line 323, in _create_connection
return _ConnectionRecord(self)
File "/var/www/get5-web/venv/local/lib/python2.7/site-packages/sqlalchemy/pool.py", line 449, in init
self.connection = self.__connect()
File "/var/www/get5-web/venv/local/lib/python2.7/site-packages/sqlalchemy/pool.py", line 607, in __connect
connection = self.__pool._invoke_creator(self)
File "/var/www/get5-web/venv/local/lib/python2.7/site-packages/sqlalchemy/engine/strategies.py", line 97, in connect
return dialect.connect(*cargs, **cparams)
File "/var/www/get5-web/venv/local/lib/python2.7/site-packages/sqlalchemy/engine/default.py", line 385, in connect
return self.dbapi.connect(*cargs, **cparams)
File "/var/www/get5-web/venv/local/lib/python2.7/site-packages/MySQLdb/init.py", line 81, in Connect
return Connection(*args, **kwargs)
File "/var/www/get5-web/venv/local/lib/python2.7/site-packages/MySQLdb/connections.py", line 193, in init
super(Connection, self).init(*args, **kwargs2)
sqlalchemy.exc.OperationalError: (_mysql_exceptions.OperationalError) (1045, "Access denied for user 'get5'@'localhost' (using password: YES)")

i can connect from the terminal with the userame (get5) and password

@ongloveth
Copy link

Try to reinstall, And make sure prod_config.py is correct.

@TandelK
Copy link
Contributor

TandelK commented Sep 3, 2019

Just check your prod_config.py file is properly configured.

SQLALCHEMY_DATABASE_URI = 'mysql://user:password@host/db'

If your password has / or @ would recommend changing it just for smoothness of the configuration. Also make sure you did not remove ' '

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants