Manually Remove MySQL Profile
I have two MySQL profiles in WHM that I would like to remove.
The default is a remote MySQL server that no longer exists and the second is a localhost MySQL server that never existed.
Because neither of them actually exist, I can't remove them via WHM.
Is there a file somewhere that I can edit to remove them?
-
I found the answer.
/var/cpanel/mysql/remote_profiles/profiles.json
0 -
Would it cause any issues if I just emptied this file. I don't want WHM to manage my database server.
0 -
Hey there! No, you can't just leave that file empty, but here is what a default version of that file looks like with no custom profiles setup:
{"localhost":{"active":1,"mysql_pass":"MYSQLROOTPASSWORDGOESHERE","setup_via":"Auto-Migrated active profile","mysql_port":"3306","mysql_user":"root","mysql_host":"localhost"}}
0 -
Thanks. I've reset it to the default.
0 -
Sounds good - let me know if you need anything else!
0 -
I've started receiving notification emails with the subject "Cron <root@y.y.y.y> /usr/bin/test -x /usr/local/cpanel/scripts/update_db_cache && /usr/local/cpanel/scripts/update_db_cache"
With the message -
Failed to determine MySQL state; we proceed as though the server were down. Cpanel::Exception/(XID 3evb8k) Cpanel::Socket::IP connection (PeerAddr x.x.x.x PeerPort 3306 Timeout 5) failure: [No route to host] [No route to host] at /usr/local/cpanel/Cpanel/Socket/IOBase.pm line 71.
Cpanel::Socket::IOBase::new("Cpanel::Socket::IP", "PeerAddr", "x.x.x.x", "PeerPort", 3306, "Timeout", 5) called at /usr/local/cpanel/Cpanel/MysqlUtils/Unprivileged.pm line 199
Cpanel::MysqlUtils::Unprivileged::__ANON__() called at /usr/local/cpanel/3rdparty/perl/536/cpanel-lib/Try/Tiny.pm line 100
eval {...} called at /usr/local/cpanel/3rdparty/perl/536/cpanel-lib/Try/Tiny.pm line 91
Try::Tiny::try(CODE(0x24325c0), Try::Tiny::Catch=REF(0x2432560)) called at /usr/local/cpanel/Cpanel/MysqlUtils/Unprivileged.pm line 209
Cpanel::MysqlUtils::Unprivileged::_get_socket("x.x.x.x", 3306) called at /usr/local/cpanel/Cpanel/MysqlUtils/Unprivileged.pm line 88
Cpanel::MysqlUtils::Unprivileged::get_version_from_host("x.x.x.x", 3306) called at /usr/local/cpanel/Cpanel/MysqlRun.pm line 76
Cpanel::MysqlRun::__ANON__() called at /usr/local/cpanel/3rdparty/perl/536/cpanel-lib/Try/Tiny.pm line 100
eval {...} called at /usr/local/cpanel/3rdparty/perl/536/cpanel-lib/Try/Tiny.pm line 91
Try::Tiny::try(CODE(0x2432200), Try::Tiny::Catch=REF(0xf30c20)) called at /usr/local/cpanel/Cpanel/MysqlRun.pm line 81
Cpanel::MysqlRun::running() called at bin/update_db_cache.pl line 408
bin::update_db_cache::_mysql_is_available() called at bin/update_db_cache.pl line 47
bin::update_db_cache::script("bin::update_db_cache") called at bin/update_db_cache.pl line 42Where else do I need to go to tell cPanel that we have no MySQL servers?
(I've already turned off monitoring)
0 -
Just to confirm, you've disabled the database server and the monitoring option in WHM >> Service Manager?
0 -
Yes
And the MySQL profile has been set to the default as discussed earlier.
0 -
In the file "/usr/local/cpanel/scripts/update_db_cache", I've commented out the line - "exec '/usr/local/cpanel/bin/update_db_cache', @ARGV;"
I'll see if this stops the constant emails.
0
Please sign in to leave a comment.
Comments
9 comments