Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the copy-the-code domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /var/www/html/pcx3.com/wp-includes/functions.php on line 6121

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the pb-seo-friendly-images domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /var/www/html/pcx3.com/wp-includes/functions.php on line 6121

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the johannes domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /var/www/html/pcx3.com/wp-includes/functions.php on line 6121
How to change MySQL root Password in CyberPanel - PC✗3
How to change MySQL root Password in CyberPanel

How to change MySQL root Password in CyberPanel

To change MySQL root password in CyberPanel we need to update it’s configuration.

CyberPanel stores MySQL root password into two files:

  • /etc/cyberpanel/mysqlPassword
  • /usr/local/CyberCP/CyberCP/settings.py

mysqlPassword File contains the MySQL root password and to change the password we have to edit this file.

After changing the password we need to update the settings.py file which holds Django settings.

Under DATABASES you can update the password.

DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.mysql',
        'NAME': 'cyberpanel',
        'USER': 'cyberpanel',
        'PASSWORD': 'Q02PhIk8rKYwnJ',
        'HOST': 'localhost',
        'PORT': '',
    },
    'rootdb': {
        'ENGINE': 'django.db.backends.mysql',
        'NAME': 'mysql',
        'USER': 'root',
        'PASSWORD': 'qwerty2022',
        'HOST': 'localhost',
        'PORT': '',
    },
}
  • cyberpanel database is used by the CyberPanel software.
  • mysql database schema is used by the MySQL server and it holds all the users and their privileges details.

And finally after modifying these two files we need to restart the CyberPanel service:

systemctl restart lscpd.service

That’s it, we’ve just changed the MySQL root password in CyberPanel.

NOTE: In older versions of CyberPanel you also have to update the root password in /home/cyberpanel/.my.cnf file.

whoami
Stefan Pejcic
Join the discussion

I enjoy constructive responses and professional comments to my posts, and invite anyone to comment or link to my site.