Closed Dal1ster closed 1 year ago
you need to supply the correct db credentials, you are being denied access to the DB because the credentials or permissions granted to that user are incorrect
Nope, even after correcting the password, it still says Access Denied. I made sure that it was the correct pass for the database as well.
That is the database telling you permission denied. You set something up wrong with the permission then, where that user is not allowed to create the database.
Trying to do the flask db update command to finish up the setup of the dashboard, but every time i try to run it, this pops up. I have followed every step exactly as specified, but for some reason it still always does this. Error thing down below Traceback (most recent call last): File "/usr/local/lib/python3.10/dist-packages/sqlalchemy/engine/base.py", line 1771, in _execute_context self.dialect.do_execute( File "/usr/local/lib/python3.10/dist-packages/sqlalchemy/engine/default.py", line 717, in do_execute cursor.execute(statement, parameters) File "/usr/local/lib/python3.10/dist-packages/pymysql/cursors.py", line 148, in execute result = self._query(query) File "/usr/local/lib/python3.10/dist-packages/pymysql/cursors.py", line 310, in _query conn.query(q) File "/usr/local/lib/python3.10/dist-packages/pymysql/connections.py", line 548, in query self._affected_rows = self._read_query_result(unbuffered=unbuffered) File "/usr/local/lib/python3.10/dist-packages/pymysql/connections.py", line 775, in _read_query_result result.read() File "/usr/local/lib/python3.10/dist-packages/pymysql/connections.py", line 1156, in read first_packet = self.connection._read_packet() File "/usr/local/lib/python3.10/dist-packages/pymysql/connections.py", line 725, in _read_packet packet.raise_for_error() File "/usr/local/lib/python3.10/dist-packages/pymysql/protocol.py", line 221, in raise_for_error err.raise_mysql_exception(self._data) File "/usr/local/lib/python3.10/dist-packages/pymysql/err.py", line 143, in raise_mysql_exception raise errorclass(errno, errval) pymysql.err.OperationalError: (1005, 'Can\'t create table
darkflame
.alembic_version
(errno: 13 "Permission denied")')The above exception was the direct cause of the following exception:
Traceback (most recent call last): File "/usr/local/bin/flask", line 8, in
sys.exit(main())
File "/usr/local/lib/python3.10/dist-packages/flask/cli.py", line 990, in main
cli.main(args=sys.argv[1:])
File "/usr/local/lib/python3.10/dist-packages/flask/cli.py", line 596, in main
return super().main(args, kwargs)
File "/usr/local/lib/python3.10/dist-packages/click/core.py", line 1062, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python3.10/dist-packages/click/core.py", line 1668, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/local/lib/python3.10/dist-packages/click/core.py", line 1668, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/local/lib/python3.10/dist-packages/click/core.py", line 1404, in invoke
return ctx.invoke(self.callback, ctx.params)
File "/usr/local/lib/python3.10/dist-packages/click/core.py", line 763, in invoke
return __callback(args, kwargs)
File "/usr/local/lib/python3.10/dist-packages/click/decorators.py", line 26, in new_func
return f(get_current_context(), *args, *kwargs)
File "/usr/local/lib/python3.10/dist-packages/flask/cli.py", line 440, in decorator
return __ctx.invoke(f, args, kwargs)
File "/usr/local/lib/python3.10/dist-packages/click/core.py", line 763, in invoke
return callback(*args, **kwargs)
File "/usr/local/lib/python3.10/dist-packages/flask_migrate/cli.py", line 149, in upgrade
_upgrade(directory, revision, sql, tag, x_arg)
File "/usr/local/lib/python3.10/dist-packages/flask_migrate/init__.py", line 98, in wrapped
f(*args, kwargs)
File "/usr/local/lib/python3.10/dist-packages/flask_migrate/init.py", line 185, in upgrade
command.upgrade(config, revision, sql=sql, tag=tag)
File "/usr/local/lib/python3.10/dist-packages/alembic/command.py", line 320, in upgrade
script.run_env()
File "/usr/local/lib/python3.10/dist-packages/alembic/script/base.py", line 563, in run_env
util.load_python_file(self.dir, "env.py")
File "/usr/local/lib/python3.10/dist-packages/alembic/util/pyfiles.py", line 92, in load_python_file
module = load_module_py(module_id, path)
File "/usr/local/lib/python3.10/dist-packages/alembic/util/pyfiles.py", line 108, in load_module_py
spec.loader.exec_module(module) # type: ignore
File "", line 883, in exec_module
File "", line 241, in _call_with_frames_removed
File "/home/brickmaster/NexusDashboard/migrations/env.py", line 91, in
run_migrations_online()
File "/home/brickmaster/NexusDashboard/migrations/env.py", line 85, in run_migrations_online
context.run_migrations()
File "", line 8, in run_migrations
File "/usr/local/lib/python3.10/dist-packages/alembic/runtime/environment.py", line 851, in run_migrations
self.get_context().run_migrations( kw)
File "/usr/local/lib/python3.10/dist-packages/alembic/runtime/migration.py", line 603, in run_migrations
self._ensure_version_table()
File "/usr/local/lib/python3.10/dist-packages/alembic/runtime/migration.py", line 539, in _ensure_version_table
self._version.create(self.connection, checkfirst=True)
File "/usr/local/lib/python3.10/dist-packages/sqlalchemy/sql/schema.py", line 944, in create
bind._run_ddl_visitor(ddl.SchemaGenerator, self, checkfirst=checkfirst)
File "/usr/local/lib/python3.10/dist-packages/sqlalchemy/engine/base.py", line 2082, in _run_ddl_visitor
visitorcallable(self.dialect, self, kwargs).traverse_single(element)
File "/usr/local/lib/python3.10/dist-packages/sqlalchemy/sql/visitors.py", line 520, in traverse_single
return meth(obj, kw)
File "/usr/local/lib/python3.10/dist-packages/sqlalchemy/sql/ddl.py", line 890, in visit_table
self.connection.execute(
File "/usr/local/lib/python3.10/dist-packages/sqlalchemy/engine/base.py", line 1263, in execute
return meth(self, multiparams, params, _EMPTY_EXECUTION_OPTS)
File "/usr/local/lib/python3.10/dist-packages/sqlalchemy/sql/ddl.py", line 77, in _execute_on_connection
return connection._execute_ddl(
File "/usr/local/lib/python3.10/dist-packages/sqlalchemy/engine/base.py", line 1353, in _execute_ddl
ret = self._execute_context(
File "/usr/local/lib/python3.10/dist-packages/sqlalchemy/engine/base.py", line 1814, in _execute_context
self._handle_dbapi_exception(
File "/usr/local/lib/python3.10/dist-packages/sqlalchemy/engine/base.py", line 1995, in _handle_dbapiexception
util.raise(
File "/usr/local/lib/python3.10/dist-packages/sqlalchemy/util/compat.py", line 207, in raise_
raise exception
File "/usr/local/lib/python3.10/dist-packages/sqlalchemy/engine/base.py", line 1771, in _execute_context
self.dialect.do_execute(
File "/usr/local/lib/python3.10/dist-packages/sqlalchemy/engine/default.py", line 717, in do_execute
cursor.execute(statement, parameters)
File "/usr/local/lib/python3.10/dist-packages/pymysql/cursors.py", line 148, in execute
result = self._query(query)
File "/usr/local/lib/python3.10/dist-packages/pymysql/cursors.py", line 310, in _query
conn.query(q)
File "/usr/local/lib/python3.10/dist-packages/pymysql/connections.py", line 548, in query
self._affected_rows = self._read_query_result(unbuffered=unbuffered)
File "/usr/local/lib/python3.10/dist-packages/pymysql/connections.py", line 775, in _read_query_result
result.read()
File "/usr/local/lib/python3.10/dist-packages/pymysql/connections.py", line 1156, in read
first_packet = self.connection._read_packet()
File "/usr/local/lib/python3.10/dist-packages/pymysql/connections.py", line 725, in _read_packet
packet.raise_for_error()
File "/usr/local/lib/python3.10/dist-packages/pymysql/protocol.py", line 221, in raise_for_error
err.raise_mysql_exception(self._data)
File "/usr/local/lib/python3.10/dist-packages/pymysql/err.py", line 143, in raise_mysql_exception
raise errorclass(errno, errval)
sqlalchemy.exc.OperationalError: (pymysql.err.OperationalError) (1005, 'Can\'t create table
darkflame
.alembic_version
(errno: 13 "Permission denied")') [SQL: CREATE TABLE alembic_version ( version_num VARCHAR(32) NOT NULL, CONSTRAINT alembic_version_pkc PRIMARY KEY (version_num) )] (Background on this error at: https://sqlalche.me/e/14/e3q8)