Symptoms
- The server uses a remote MySQL profile (for example,
cpaneldb), and the local MySQL/MariaDB service is disabled inWHM / Home / Service Configuration / Service Manager. -
elevate-cpanel --checkor--startreports a warning similar to the following, but no blocker:
[WARN] MariaDB is disabled. This must be enabled for the upgrade to succeed. We temporarily will enable it when it is needed to be enabled, but we recommend starting the process with MariaDB enabled.
- The ELevate process fails during stage 2 with one of the following errors:
[INFO] Saving the currently active MySQL Profile (cpaneldb) to /var/cpanel/elevate-mysql-profile [INFO] Attempting to create new localhost MySQL profile... [INFO] Resetting password for local root database user... [INFO] Activating "localhost" MySQL profile [!] Validating profile ... Failed: (XID 254rxy) Unable to connect to the MySQL host "localhost". Connection failed with error: Can't connect to local server through socket '/var/lib/mysql/mysql.sock' (2) [!] MySQL profile activation failed. [ERROR] The elevation process failed during stage 2. [FATAL] Unable to activate a MySQL profile for "localhost"
[INFO] Attempting to create new localhost MySQL profile... [INFO] Resetting password for local root database user... [ERROR] The elevation process failed during stage 2. [FATAL] Unable to set root password for the localhost database server. (XID u2x5cu) The system failed to create the temporary file "/nonexistent/.-.work.AuYKK7Sg" because of an error: Permission denied
- Running
/scripts/restartsrv_mysqlreturns the following:
[restartsrv_mysql] The service 'mysql' is disabled and the system will not attempt to restart it. (XID avatu8) The "mysql" service is disabled.
Cause
During stage 2, ELevate creates a temporary "localhost" MySQL profile and activates it, even when the active profile is remote. This requires cPanel to be able to manage a running local database server. When the database service is disabled in the Service Manager, cPanel will not start it, so ELevate cannot set the local root password or activate the localhost profile.
The ELevate warning states that the service will be temporarily enabled when needed. This does not happen in this scenario, and elevate-cpanel --check does not report a blocker. This is tracked in case CPANEL-58180.
Case RE-34 previously changed ELevate to install a local MySQL profile when a remote profile is in use. It does not cover a local database service that is disabled.
Resolution
Warning: Upgrading the operating system can cause data loss or catastrophic system failures. Before continuing, take a server snapshot or backup, including a dump of the remote databases.
- Log in to WHM as the root user.
- Navigate to
WHM / Home / Service Configuration / Service Manager. - Enable the database service (MySQL/MariaDB) and enable monitoring for it, and then click Save.
- Log in to the server via SSH or WHM's Terminal as the root user, and verify that the service is running:
/scripts/restartsrv_mysql --status
- If ELevate already failed at stage 2, resume the process:
/scripts/elevate-cpanel --continue
If you have not started ELevate yet, enable the service before running/scripts/elevate-cpanel --start.
Additional Information
- What systems can cPanel ELevate upgrade?
- Manage MySQL Profiles
- Internal cases: CPANEL-58180 (this issue), RE-34 (ELevate installs a local MySQL profile when a remote profile is active).
- Source ticket: 96102615
Comments
0 comments
Please sign in to leave a comment.