Symptoms
- The server uses a remote MySQL profile (for example,
cpaneldb), and the local MySQL/MariaDB service is not running or is not installed. -
The ELevate process fails during stage 2 with errors similar to the following:
CONFIG_TEXT: [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"
Cause
During stage 2, ELevate saves the active remote profile, creates a temporary "localhost" MySQL profile, and then activates it. The activation fails because no local MySQL/MariaDB server is running and listening on /var/lib/mysql/mysql.sock. Servers that use a remote MySQL profile commonly have the local database service disabled, stopped, or not installed.
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 the server via SSH or WHM's Terminal as the root user.
-
Check the state of the local database server and the saved profile:
# /scripts/restartsrv_mysql --status
dpkg -l | grep -iE 'mariadb|mysql'
systemctl status mariadb mysql --no-pager
cat /var/cpanel/elevate-mysql-profile
/usr/local/cpanel/scripts/manage_mysql_profiles --list - If a local MySQL/MariaDB server is not installed or is not running, install it and start it so that the localhost profile can be activated.
-
Activate the localhost profile in WHM / Home / SQL Services / Manage MySQL Profiles, or run:
# /usr/local/cpanel/scripts/manage_mysql_profiles --activate localhost
-
Resume the ELevate process:
# /scripts/elevate-cpanel --continue
- After ELevate completes, reactivate the remote MySQL profile in WHM / Home / SQL Services / Manage MySQL Profiles.
Additional Information
- What systems can cPanel ELevate upgrade?
- Manage MySQL Profiles
- Related tickets: 96102615 (source), 95270737 and 95760640 (ELevate with a remote MySQL profile).
Comments
0 comments
Please sign in to leave a comment.