How To create Database facing operation failed Error

Welcome @applemart Happy you are here

Kindly run the following command in SSH terminal mysqld_safe --syslog then retry creating the database and post the contents of cat /var/log/syslog

Also post any issues here https://<IP Address>:8090/serverstatus/cyberCPMainLogFile after retrying

remove special charter and try

Should help if you possible change mysql root password or there are inconsistencies

sorry, it is not clear where I should change the password and where I should update the new password so it can connect?

You have to use mysql console e.g.

> ALTER USER 'root'@'localhost' IDENTIFIED BY 'MyNewPass';

Issue is clear,

I’m facing same BTW and it’s due to securing my MySQL with a new Root password.

But, Seems that CyberPanel using a root user without password.

The question to the community is simple, where I can change such password of the root user which is related to the CyberPanel configuration?

Please advise in priority.

# search for DATABASES = and change root password to what you changed to
nano /usr/local/CyberCP/CyberCP/settings.py
# after editing run the next command
# this only contains root password - check if it is same as root password you changed to
nano /etc/cyberpanel/mysqlPassword
# after editing run the next command
# if empty ignore
nano /home/cyberpanel/.my.cnf
1 Like

Thanks dear, I have two questions:

First one, Do I have to change in the below area which both should be the same?
I see i have two users in the below file:
nano /usr/local/CyberCP/CyberCP/settings.py

DATABASES = {
‘default’: {
‘ENGINE’: ‘django.db.backends.mysql’,
‘NAME’: ‘cyberpanel’,
‘USER’: ‘cyberpanel’,
‘PASSWORD’: ‘XXXXXXXX’,
‘HOST’: ‘localhost’,
‘PORT’: ‘’
},
‘rootdb’: {
‘ENGINE’: ‘django.db.backends.mysql’,
‘NAME’: ‘mysql’,
‘USER’: ‘root’,
‘PASSWORD’: ‘XXXXXXX’,
‘HOST’: ‘localhost’,
‘PORT’: ‘’,
},
}

Second question somehow I don’t have the below file:
nano /home/cyberpanel/.my.cnf

It is fine?

Currently I’m getting the below Error now:
Installation failed. Error message: [“‘int’ object is not iterable [404]”]

Working fine. thanks a lot!