Failed to run manage.py makemigrations

Hi guys,

I’m installing Cyberpanel full install on CentOS7 with remote database.
Connection to the database was successfully achieved manually but for some reason installation can’t connect to my database.

Already double checked user, password and host.
The table was already created, but it is empty for now.

During installation I got the following error message:

Running /usr/local/CyberPanel/bin/python manage.py makemigrations failed. Running again, try number 3

Traceback (most recent call last):
File “/usr/local/CyberPanel/lib/python3.6/site-packages/django/db/backends/base/base.py”, line 219, in ensure_connection
self.connect()
File “/usr/local/CyberPanel/lib/python3.6/site-packages/django/utils/asyncio.py”, line 26, in inner
return func(*args, **kwargs)
File “/usr/local/CyberPanel/lib/python3.6/site-packages/django/db/backends/base/base.py”, line 200, in connect
self.connection = self.get_new_connection(conn_params)
File “/usr/local/CyberPanel/lib/python3.6/site-packages/django/utils/asyncio.py”, line 26, in inner
return func(*args, **kwargs)
File “/usr/local/CyberPanel/lib/python3.6/site-packages/django/db/backends/mysql/base.py”, line 234, in get_new_connection
return Database.connect(**conn_params)
File “/usr/local/CyberPanel/lib/python3.6/site-packages/MySQLdb/init.py”, line 130, in Connect
return Connection(*args, **kwargs)
File “/usr/local/CyberPanel/lib/python3.6/site-packages/MySQLdb/connections.py”, line 185, in init
super().init(*args, **kwargs2)
MySQLdb._exceptions.OperationalError: (1045, “Access denied for user ‘cyberpanel’@‘10.101.1.60’ (using password: YES)”)

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File “manage.py”, line 22, in
execute_from_command_line(sys.argv)
File “/usr/local/CyberPanel/lib/python3.6/site-packages/django/core/management/init.py”, line 401, in execute_from_command_line
utility.execute()
File “/usr/local/CyberPanel/lib/python3.6/site-packages/django/core/management/init.py”, line 395, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File “/usr/local/CyberPanel/lib/python3.6/site-packages/django/core/management/base.py”, line 330, in run_from_argv
self.execute(*args, **cmd_options)
File “/usr/local/CyberPanel/lib/python3.6/site-packages/django/core/management/base.py”, line 371, in execute
output = self.handle(*args, **options)
File “/usr/local/CyberPanel/lib/python3.6/site-packages/django/core/management/base.py”, line 85, in wrapped
res = handle_func(*args, **kwargs)
File “/usr/local/CyberPanel/lib/python3.6/site-packages/django/core/management/commands/makemigrations.py”, line 101, in handle
loader.check_consistent_history(connection)
File “/usr/local/CyberPanel/lib/python3.6/site-packages/django/db/migrations/loader.py”, line 290, in check_consistent_history
applied = recorder.applied_migrations()
File “/usr/local/CyberPanel/lib/python3.6/site-packages/django/db/migrations/recorder.py”, line 77, in applied_migrations
if self.has_table():
File “/usr/local/CyberPanel/lib/python3.6/site-packages/django/db/migrations/recorder.py”, line 55, in has_table
with self.connection.cursor() as cursor:
File “/usr/local/CyberPanel/lib/python3.6/site-packages/django/utils/asyncio.py”, line 26, in inner
return func(*args, **kwargs)
File “/usr/local/CyberPanel/lib/python3.6/site-packages/django/db/backends/base/base.py”, line 259, in cursor
return self._cursor()
File “/usr/local/CyberPanel/lib/python3.6/site-packages/django/db/backends/base/base.py”, line 235, in _cursor
self.ensure_connection()
File “/usr/local/CyberPanel/lib/python3.6/site-packages/django/utils/asyncio.py”, line 26, in inner
return func(*args, **kwargs)
File “/usr/local/CyberPanel/lib/python3.6/site-packages/django/db/backends/base/base.py”, line 219, in ensure_connection
self.connect()
File “/usr/local/CyberPanel/lib/python3.6/site-packages/django/db/utils.py”, line 90, in exit
raise dj_exc_value.with_traceback(traceback) from exc_value
File “/usr/local/CyberPanel/lib/python3.6/site-packages/django/db/backends/base/base.py”, line 219, in ensure_connection
self.connect()
File “/usr/local/CyberPanel/lib/python3.6/site-packages/django/utils/asyncio.py”, line 26, in inner
return func(*args, **kwargs)
File “/usr/local/CyberPanel/lib/python3.6/site-packages/django/db/backends/base/base.py”, line 200, in connect
self.connection = self.get_new_connection(conn_params)
File “/usr/local/CyberPanel/lib/python3.6/site-packages/django/utils/asyncio.py”, line 26, in inner
return func(*args, **kwargs)
File “/usr/local/CyberPanel/lib/python3.6/site-packages/django/db/backends/mysql/base.py”, line 234, in get_new_connection
return Database.connect(**conn_params)
File “/usr/local/CyberPanel/lib/python3.6/site-packages/MySQLdb/init.py”, line 130, in Connect
return Connection(*args, **kwargs)
File “/usr/local/CyberPanel/lib/python3.6/site-packages/MySQLdb/connections.py”, line 185, in init
super().init(*args, **kwargs2)
django.db.utils.OperationalError: (1045, “Access denied for user ‘cyberpanel’@‘10.101.1.60’ (using password: YES)”)

I would first install with local database then connect it to remote database

That worked!

Type your comment> @edsonsantoro said:

That worked!

can I ask about the achievement? when I run the installation again and enter the data to the remote database with all the necessary data and permissions, it still does not connect me. I run virtual servers on proxmox, web on dmz lan and database on private lan. Thanks