How to Fix "The MySQL Server is Currently Offline" Issue in cPanel

If you're facing issues with the latest version of MariaDB on some cPanel accounts and encountering the "MySQL server is currently offline" error, follow this detailed guide to resolve the problem.

Step 1: Execute the Autofix Command

  1. Run the Autofix Command: Begin by executing the autofix command designed to address common issues with MariaDB:

/scripts/autorepair fix_mariadb_show_grants_roles
  1. This command attempts to automatically repair the issue. Monitor the output to see if the problem is resolved.

Step 2: Check the cPanel Error Log

  1. Access the Error Log: If the autofix command does not resolve the issue, review the cPanel error log for additional details that might help diagnose the problem:

tail -n 50 /usr/local/cpanel/logs/error_log
  1. This command displays the last 50 lines of the error log. Analyze the log entries to identify any relevant errors or issues that need to be addressed.

Step 3: Resolve the "CpuserNotInMap" Error

  1. Identify the Error: If you encounter the error message:

Cpanel::Exception::Database::CpuserNotInMap/(XID xfttxq) The cPanel user "username" does not exist in the database map

 

  • This indicates a problem with the MySQL user mapping.

  • Update the Database Map: Use the following command to update the user's database map, replacing $user with the affected cPanel account's username:

/scripts/rebuild_dbmap $user
  1. This command updates the database map for the specified user and should resolve the issue. Ensure you replace $user with the actual username of the affected cPanel account.

Important Notes

  • Command Replacement: Make sure to substitute $user with the correct username in the command to ensure it targets the appropriate account.
  • Log Review: Regularly check the cPanel error log for any recurring issues or additional information.

Conclusion

By following these steps, you should be able to address the "MySQL server is currently offline" issue related to the latest version of MariaDB on your cPanel accounts. For ongoing issues or additional support, consult the official cPanel documentation or contact your hosting provider.

For more troubleshooting guides and resources, visit FizHost.

 

 
 
 
Was this answer helpful? 185 Users Found This Useful (286 Votes)