Ubuntu 20.04 - Installation Failed (Remote MySQL) cyberpanel user

Problem: Installation failed while using Remote MySQL installation option. Cyberpanel creating new user name ‘cyberpanel’@‘xx.xxx.xx.xx’ & cyberpanel create database ‘cyberpanel’.

Given db user and password had no issue. Because cyberpanel manage to create a new user and database with it.

Why don’t cyberpanel use the given db user and password instead of creating a new cyberpanel user, error started while migration.

Virtualization Type: KVM

System: Ubuntu 20.04

Installation option: none

OLS or Enterprise?
OLS

Installing from official server or mirror server?
official

Install Memcached extension for PHP?
no

Install LiteSpeed Memcached?
no

Install Memcached?
no

Install Redis extension for PHP?
yes

Install Redis?
yes

[07.04.2021_23-30-08] #########################################################################

[07.04.2021_23-30-08] Running: /usr/local/CyberPanel/bin/python manage.py makemigrations

[07.04.2021_23-30-08] #########################################################################

/usr/local/CyberCP/dockerManager/container.py:122: SyntaxWarning: “is” with a literal. Did you mean “==”?
if image is None or image is ‘’ or tag is None or tag is ‘’:
/usr/local/CyberCP/dockerManager/container.py:122: SyntaxWarning: “is” with a literal. Did you mean “==”?
if image is None or image is ‘’ or tag is None or tag is ‘’:
Traceback (most recent call last):
File “/usr/local/CyberPanel/lib/python3.8/site-packages/django/db/backends/base/base.py”, line 219, in ensure_connection
self.connect()
File “/usr/local/CyberPanel/lib/python3.8/site-packages/django/utils/asyncio.py”, line 26, in inner
return func(*args, **kwargs)
File “/usr/local/CyberPanel/lib/python3.8/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.8/site-packages/django/utils/asyncio.py”, line 26, in inner
return func(*args, **kwargs)
File “/usr/local/CyberPanel/lib/python3.8/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.8/site-packages/MySQLdb/init.py”, line 130, in Connect
return Connection(*args, **kwargs)
File “/usr/local/CyberPanel/lib/python3.8/site-packages/MySQLdb/connections.py”, line 185, in init
super().init(*args, **kwargs2)
MySQLdb._exceptions.OperationalError: (1044, “Access denied for user ‘cyberpanel’@‘9x.1xx.2xx.xx’ to database ‘cyberpanel’”)

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.8/site-packages/django/core/management/init.py”, line 401, in execute_from_command_line
utility.execute()
File “/usr/local/CyberPanel/lib/python3.8/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.8/site-packages/django/core/management/base.py”, line 330, in run_from_argv
self.execute(*args, **cmd_options)
File “/usr/local/CyberPanel/lib/python3.8/site-packages/django/core/management/base.py”, line 371, in execute
output = self.handle(*args, **options)
File “/usr/local/CyberPanel/lib/python3.8/site-packages/django/core/management/base.py”, line 85, in wrapped
res = handle_func(*args, **kwargs)
File “/usr/local/CyberPanel/lib/python3.8/site-packages/django/core/management/commands/makemigrations.py”, line 101, in handle
loader.check_consistent_history(connection)
File “/usr/local/CyberPanel/lib/python3.8/site-packages/django/db/migrations/loader.py”, line 290, in check_consistent_history
applied = recorder.applied_migrations()
File “/usr/local/CyberPanel/lib/python3.8/site-packages/django/db/migrations/recorder.py”, line 77, in applied_migrations
if self.has_table():
File “/usr/local/CyberPanel/lib/python3.8/site-packages/django/db/migrations/recorder.py”, line 55, in has_table
with self.connection.cursor() as cursor:
File “/usr/local/CyberPanel/lib/python3.8/site-packages/django/utils/asyncio.py”, line 26, in inner
return func(*args, **kwargs)
File “/usr/local/CyberPanel/lib/python3.8/site-packages/django/db/backends/base/base.py”, line 259, in cursor
return self._cursor()
File “/usr/local/CyberPanel/lib/python3.8/site-packages/django/db/backends/base/base.py”, line 235, in _cursor
self.ensure_connection()
File “/usr/local/CyberPanel/lib/python3.8/site-packages/django/utils/asyncio.py”, line 26, in inner
return func(*args, **kwargs)
File “/usr/local/CyberPanel/lib/python3.8/site-packages/django/db/backends/base/base.py”, line 219, in ensure_connection
self.connect()
File “/usr/local/CyberPanel/lib/python3.8/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.8/site-packages/django/db/backends/base/base.py”, line 219, in ensure_connection
self.connect()
File “/usr/local/CyberPanel/lib/python3.8/site-packages/django/utils/asyncio.py”, line 26, in inner
return func(*args, **kwargs)
File “/usr/local/CyberPanel/lib/python3.8/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.8/site-packages/django/utils/asyncio.py”, line 26, in inner
return func(*args, **kwargs)
File “/usr/local/CyberPanel/lib/python3.8/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.8/site-packages/MySQLdb/init.py”, line 130, in Connect
return Connection(*args, **kwargs)
File “/usr/local/CyberPanel/lib/python3.8/site-packages/MySQLdb/connections.py”, line 185, in init
super().init(*args, **kwargs2)
django.db.utils.OperationalError: (1044, “Access denied for user ‘cyberpanel’@‘XX.2XX.1XX.XX’ to database ‘cyberpanel’”)

[07.04.2021_23-30-10] #########################################################################

[07.04.2021_23-30-10] Running /usr/local/CyberPanel/bin/python manage.py makemigrations failed. Running again, try number 1

[07.04.2021_23-30-10] #########################################################################

Traceback (most recent call last):
File “/usr/local/CyberPanel/lib/python3.8/site-packages/django/db/backends/base/base.py”, line 219, in ensure_connection
self.connect()
File “/usr/local/CyberPanel/lib/python3.8/site-packages/django/utils/asyncio.py”, line 26, in inner
return func(*args, **kwargs)
File “/usr/local/CyberPanel/lib/python3.8/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.8/site-packages/django/utils/asyncio.py”, line 26, in inner
return func(*args, **kwargs)
File “/usr/local/CyberPanel/lib/python3.8/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.8/site-packages/MySQLdb/init.py”, line 130, in Connect
return Connection(*args, **kwargs)
File “/usr/local/CyberPanel/lib/python3.8/site-packages/MySQLdb/connections.py”, line 185, in init
super().init(*args, **kwargs2)
MySQLdb._exceptions.OperationalError: (1044, “Access denied for user ‘cyberpanel’@‘XX.2XX.1XX.XX’ to database ‘cyberpanel’”)

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.8/site-packages/django/core/management/init.py”, line 401, in execute_from_command_line
utility.execute()
File “/usr/local/CyberPanel/lib/python3.8/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.8/site-packages/django/core/management/base.py”, line 330, in run_from_argv
self.execute(*args, **cmd_options)
File “/usr/local/CyberPanel/lib/python3.8/site-packages/django/core/management/base.py”, line 371, in execute
output = self.handle(*args, **options)
File “/usr/local/CyberPanel/lib/python3.8/site-packages/django/core/management/base.py”, line 85, in wrapped
res = handle_func(*args, **kwargs)
File “/usr/local/CyberPanel/lib/python3.8/site-packages/django/core/management/commands/makemigrations.py”, line 101, in handle
loader.check_consistent_history(connection)
File “/usr/local/CyberPanel/lib/python3.8/site-packages/django/db/migrations/loader.py”, line 290, in check_consistent_history
applied = recorder.applied_migrations()
File “/usr/local/CyberPanel/lib/python3.8/site-packages/django/db/migrations/recorder.py”, line 77, in applied_migrations
if self.has_table():
File “/usr/local/CyberPanel/lib/python3.8/site-packages/django/db/migrations/recorder.py”, line 55, in has_table
with self.connection.cursor() as cursor:
File “/usr/local/CyberPanel/lib/python3.8/site-packages/django/utils/asyncio.py”, line 26, in inner
return func(*args, **kwargs)
File “/usr/local/CyberPanel/lib/python3.8/site-packages/django/db/backends/base/base.py”, line 259, in cursor
return self._cursor()
File “/usr/local/CyberPanel/lib/python3.8/site-packages/django/db/backends/base/base.py”, line 235, in _cursor
self.ensure_connection()
File “/usr/local/CyberPanel/lib/python3.8/site-packages/django/utils/asyncio.py”, line 26, in inner
return func(*args, **kwargs)
File “/usr/local/CyberPanel/lib/python3.8/site-packages/django/db/backends/base/base.py”, line 219, in ensure_connection
self.connect()
File “/usr/local/CyberPanel/lib/python3.8/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.8/site-packages/django/db/backends/base/base.py”, line 219, in ensure_connection
self.connect()
File “/usr/local/CyberPanel/lib/python3.8/site-packages/django/utils/asyncio.py”, line 26, in inner
return func(*args, **kwargs)
File “/usr/local/CyberPanel/lib/python3.8/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.8/site-packages/django/utils/asyncio.py”, line 26, in inner
return func(*args, **kwargs)
File “/usr/local/CyberPanel/lib/python3.8/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.8/site-packages/MySQLdb/init.py”, line 130, in Connect
return Connection(*args, **kwargs)
File “/usr/local/CyberPanel/lib/python3.8/site-packages/MySQLdb/connections.py”, line 185, in init
super().init(*args, **kwargs2)
django.db.utils.OperationalError: (1044, “Access denied for user ‘cyberpanel’@‘XX.2XX.1XX.XX’ to database ‘cyberpanel’”)

[07.04.2021_23-30-12] #########################################################################

[07.04.2021_23-30-12] Running /usr/local/CyberPanel/bin/python manage.py makemigrations failed. Running again, try number 2

[07.04.2021_23-30-12] #########################################################################

Traceback (most recent call last):
File “/usr/local/CyberPanel/lib/python3.8/site-packages/django/db/backends/base/base.py”, line 219, in ensure_connection
self.connect()
File “/usr/local/CyberPanel/lib/python3.8/site-packages/django/utils/asyncio.py”, line 26, in inner
return func(*args, **kwargs)
File “/usr/local/CyberPanel/lib/python3.8/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.8/site-packages/django/utils/asyncio.py”, line 26, in inner
return func(*args, **kwargs)
File “/usr/local/CyberPanel/lib/python3.8/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.8/site-packages/MySQLdb/init.py”, line 130, in Connect
return Connection(*args, **kwargs)
File “/usr/local/CyberPanel/lib/python3.8/site-packages/MySQLdb/connections.py”, line 185, in init
super().init(*args, **kwargs2)
MySQLdb._exceptions.OperationalError: (1044, “Access denied for user ‘cyberpanel’@‘XX.2XX.1XX.XX’ to database ‘cyberpanel’”)

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.8/site-packages/django/core/management/init.py”, line 401, in execute_from_command_line
utility.execute()
File “/usr/local/CyberPanel/lib/python3.8/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.8/site-packages/django/core/management/base.py”, line 330, in run_from_argv
self.execute(*args, **cmd_options)
File “/usr/local/CyberPanel/lib/python3.8/site-packages/django/core/management/base.py”, line 371, in execute
output = self.handle(*args, **options)
File “/usr/local/CyberPanel/lib/python3.8/site-packages/django/core/management/base.py”, line 85, in wrapped
res = handle_func(*args, **kwargs)
File “/usr/local/CyberPanel/lib/python3.8/site-packages/django/core/management/commands/makemigrations.py”, line 101, in handle
loader.check_consistent_history(connection)
File “/usr/local/CyberPanel/lib/python3.8/site-packages/django/db/migrations/loader.py”, line 290, in check_consistent_history
applied = recorder.applied_migrations()
File “/usr/local/CyberPanel/lib/python3.8/site-packages/django/db/migrations/recorder.py”, line 77, in applied_migrations
if self.has_table():
File “/usr/local/CyberPanel/lib/python3.8/site-packages/django/db/migrations/recorder.py”, line 55, in has_table
with self.connection.cursor() as cursor:
File “/usr/local/CyberPanel/lib/python3.8/site-packages/django/utils/asyncio.py”, line 26, in inner
return func(*args, **kwargs)
File “/usr/local/CyberPanel/lib/python3.8/site-packages/django/db/backends/base/base.py”, line 259, in cursor
return self._cursor()
File “/usr/local/CyberPanel/lib/python3.8/site-packages/django/db/backends/base/base.py”, line 235, in _cursor
self.ensure_connection()
File “/usr/local/CyberPanel/lib/python3.8/site-packages/django/utils/asyncio.py”, line 26, in inner
return func(*args, **kwargs)
File “/usr/local/CyberPanel/lib/python3.8/site-packages/django/db/backends/base/base.py”, line 219, in ensure_connection
self.connect()
File “/usr/local/CyberPanel/lib/python3.8/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.8/site-packages/django/db/backends/base/base.py”, line 219, in ensure_connection
self.connect()
File “/usr/local/CyberPanel/lib/python3.8/site-packages/django/utils/asyncio.py”, line 26, in inner
return func(*args, **kwargs)
File “/usr/local/CyberPanel/lib/python3.8/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.8/site-packages/django/utils/asyncio.py”, line 26, in inner
return func(*args, **kwargs)
File “/usr/local/CyberPanel/lib/python3.8/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.8/site-packages/MySQLdb/init.py”, line 130, in Connect
return Connection(*args, **kwargs)
File “/usr/local/CyberPanel/lib/python3.8/site-packages/MySQLdb/connections.py”, line 185, in init
super().init(*args, **kwargs2)
django.db.utils.OperationalError: (1044, “Access denied for user ‘cyberpanel’@‘XX.2XX.1XX.XX’ to database ‘cyberpanel’”)

[07.04.2021_23-30-13] #########################################################################

[07.04.2021_23-30-13] Running /usr/local/CyberPanel/bin/python manage.py makemigrations failed. Running again, try number 3

[07.04.2021_23-30-13] #########################################################################

[07.04.2021_23-30-13] #########################################################################

[07.04.2021_23-30-13] [ERROR] We are not able to run /usr/local/CyberPanel/bin/python manage.py makemigrations return code: 1. Fatal error, see /var/log/installLogs.txt for full details.

[07.04.2021_23-30-13] #########################################################################

Oops, something went wrong…

How can I delete or edit this thread?