Error while connecting to MySQL. Failover enacted.

mus2fa147

Registered
Oct 14, 2010
1
0
51
Karachi- Pakistan
Hello, This is Mustafa from Pakistan.
I moved shared hosting to VPS with WHM/ cpanel

I am getting weird issues since i started using cpanel

1. Error while connecting to MySQL. Failover enacted. i was getting this error and every time i tried to create db it says ' database name already taken.

I google for solution found some solutions that it happens when perl modules out dated.
then i ran some commands listed below,
Code:
perl -MCPAN -e shell
cpan> install Bundle::CPAN
cpan> reload cpan
cpan> install HTTP:ate
cpan> install Net::AIM::Connection
cpan> install Net::AIM
cpan> install Tie::IxHash
cpan> install DBI
cpan> install DBD::mysql

/scripts/mysqlup --force 

/scripts/checkperlmodules --full --force
after all this problem was still there
then i ran
Code:
/scripts/easyapache 
/scripts/upcp --force
but problem was still there i am unable to fix it
now i am getting emails every 5 minutes

mysql failed @ Fri Oct 15 22:58:21 2010. A restart was attempted automagically.
Service Check Method: [check command]

Cmd Service Check Raw Output: mysql has failed


I checked .err under /var/lib/mysql/myhost.err
Code:
101015 23:58:35 mysqld_safe mysqld from pid file /var/lib/mysql/c129.vz27.my-virtual-panel.com.pid ended
101015 23:58:54 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
101015 23:58:54 [Warning] '--default-character-set' is deprecated and will be removed in a future release. Please use '--character-set-server' instead.
101015 23:58:54 [Note] Plugin 'FEDERATED' is disabled.
101015 23:58:55  InnoDB: Started; log sequence number 0 16933658
101015 23:58:55 [Note] Event Scheduler: Loaded 0 events
101015 23:58:55 [Note] /usr/sbin/mysqld: ready for connections.
Version: '5.1.48'  socket: '/var/lib/mysql/mysql.sock'  port: 3306  MySQL Community Server (GPL)
101015 23:59:10 [Note] /usr/sbin/mysqld: Normal shutdown

101015 23:59:10 [Note] Event Scheduler: Purging the queue. 0 events
101015 23:59:10  InnoDB: Starting shutdown...
101015 23:59:16  InnoDB: Shutdown completed; log sequence number 0 16933658
101015 23:59:16 [Note] /usr/sbin/mysqld: Shutdown complete

101015 23:59:16 mysqld_safe mysqld from pid file /var/lib/mysql/c129.vz27.my-virtual-panel.com.pid ended
101015 23:59:17 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
101015 23:59:17 [Warning] '--default-character-set' is deprecated and will be removed in a future release. Please use '--character-set-server' instead.
101015 23:59:17 [Note] Plugin 'FEDERATED' is disabled.
101015 23:59:17  InnoDB: Started; log sequence number 0 16933658
101015 23:59:17 [Note] Event Scheduler: Loaded 0 events
101015 23:59:17 [Note] /usr/sbin/mysqld: ready for connections.
Version: '5.1.48'  socket: '/var/lib/mysql/mysql.sock'  port: 3306  MySQL Community Server (GPL)
101016  0:03:35 [Note] /usr/sbin/mysqld: Normal shutdown

101016  0:03:35 [Note] Event Scheduler: Purging the queue. 0 events
101016  0:03:35  InnoDB: Starting shutdown...
101016  0:03:40  InnoDB: Shutdown completed; log sequence number 0 16933658
101016  0:03:40 [Note] /usr/sbin/mysqld: Shutdown complete

101016 00:03:40 mysqld_safe mysqld from pid file /var/lib/mysql/c129.vz27.my-virtual-panel.com.pid ended
101016 00:03:58 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
101016  0:03:58 [Warning] '--default-character-set' is deprecated and will be removed in a future release. Please use '--character-set-server' instead.
101016  0:03:58 [Note] Plugin 'FEDERATED' is disabled.
101016  0:03:58  InnoDB: Started; log sequence number 0 16933658
101016  0:03:58 [Note] Event Scheduler: Loaded 0 events
101016  0:03:58 [Note] /usr/sbin/mysqld: ready for connections.
Version: '5.1.48'  socket: '/var/lib/mysql/mysql.sock'  port: 3306  MySQL Community Server (GPL)
101016  0:04:15 [Note] /usr/sbin/mysqld: Normal shutdown

101016  0:04:15 [Note] Event Scheduler: Purging the queue. 0 events
101016  0:04:15  InnoDB: Starting shutdown...
101016  0:04:18  InnoDB: Shutdown completed; log sequence number 0 16933658
101016  0:04:18 [Note] /usr/sbin/mysqld: Shutdown complete

101016 00:04:18 mysqld_safe mysqld from pid file /var/lib/mysql/c129.vz27.my-virtual-panel.com.pid ended
101016 00:04:19 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
101016  0:04:19 [Warning] '--default-character-set' is deprecated and will be removed in a future release. Please use '--character-set-server' instead.
101016  0:04:19 [Note] Plugin 'FEDERATED' is disabled.
101016  0:04:19  InnoDB: Started; log sequence number 0 16933658
101016  0:04:19 [Note] Event Scheduler: Loaded 0 events
101016  0:04:19 [Note] /usr/sbin/mysqld: ready for connections.
Version: '5.1.48'  socket: '/var/lib/mysql/mysql.sock'  port: 3306  MySQL Community Server (GPL)
101016  0:04:21 [Note] /usr/sbin/mysqld: Normal shutdown

101016  0:04:21 [Note] Event Scheduler: Purging the queue. 0 events
101016  0:04:21  InnoDB: Starting shutdown...
101016  0:04:24  InnoDB: Shutdown completed; log sequence number 0 16933658
101016  0:04:24 [Note] /usr/sbin/mysqld: Shutdown complete

101016 00:04:24 mysqld_safe mysqld from pid file /var/lib/mysql/c129.vz27.my-virtual-panel.com.pid ended
101016 00:04:25 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
101016  0:04:25 [Warning] '--default-character-set' is deprecated and will be removed in a future release. Please use '--character-set-server' instead.
101016  0:04:25 [Note] Plugin 'FEDERATED' is disabled.
101016  0:04:25  InnoDB: Started; log sequence number 0 16933658
101016  0:04:25 [Note] Event Scheduler: Loaded 0 events
101016  0:04:25 [Note] /usr/sbin/mysqld: ready for connections.
Version: '5.1.48'  socket: '/var/lib/mysql/mysql.sock'  port: 3306  MySQL Community Server (GPL)
101016  0:04:37 [Note] /usr/sbin/mysqld: Normal shutdown

101016  0:04:37 [Note] Event Scheduler: Purging the queue. 0 events
101016  0:04:37  InnoDB: Starting shutdown...
101016  0:04:42  InnoDB: Shutdown completed; log sequence number 0 16933658
101016  0:04:42 [Note] /usr/sbin/mysqld: Shutdown complete
I restarted service , restart mysql server but no use
i submitted ticket to my host provider
still didn't get proper response
I am totally unable to find out what is happening

any help would highly be appreciated
Regards,
Mustafa
 

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,607
40
248
somewhere over the rainbow
cPanel Access Level
Root Administrator
Hello Mustafa,

It sounds like you do have root SSH access, which is required for submitting a ticket to us. Please submit a support ticket to our system to us due to this being an emergency issue with MySQL not functioning for your sites.

You can either use the link in my signature to submit a ticket or WHM > Support Center > Contact cPanel for this matter.

Thank you.
 

gwc_wd

Member
Oct 24, 2010
16
1
53
Hello Mustafa,

It sounds like you do have root SSH access, which is required for submitting a ticket to us. Please submit a support ticket to our system to us due to this being an emergency issue with MySQL not functioning for your sites.

You can either use the link in my signature to submit a ticket or WHM > Support Center > Contact cPanel for this matter.

Thank you.
Was this ever resolved? I am facing the same issue after upgrading from 5.0 to 5.1.

Not only do I get the connect/failover error, but the existing databases do not appear under their proper accounts (trying to recreate them results in the name-in-use error). The databases can be accessed if logged into WHM as root and the wordpress installs they support continue to function properly so the db connections are obviously occurring. They just cannot be accessed from the proper cPanel accounts.

If this has gone to a ticket and a resolution was found, it would be awfully helpful if that resolution appeared here so we can avoid reinventing the wheel <smile>.
 

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,607
40
248
somewhere over the rainbow
cPanel Access Level
Root Administrator
The user never replied back with a ticket number to know. Please submit a ticket and we'd be happy to look into it as was suggested previously for the prior post.

Again, it's an emergency matter having MySQL down, so submitting a ticket is the fastest way to resolve it since we'd have backend server access to investigate.

WHM > Support Center > Contact cPanel or using the link in my signature for a ticket submission. Please post the ticket number after opening one.

Thanks!
 

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,607
40
248
somewhere over the rainbow
cPanel Access Level
Root Administrator
I've replied to the ticket. I'm going to provide details here on what I found.

First of all, at the top of the cPanel > Mysql Databases area, it had this error listed:

Code:
Error while connecting to MySQL. Failover enacted.
This also was appearing in the Remote MySQL area on the accounts.

In /usr/local/cpanel/logs/error_log location, this was appearing:

Code:
[2010-10-24 14:46:08 -0600] warn [mysql::initcache] Encountered error in mysql::initcache: Error from mysql wrapper: <br /><b>Error while connecting to MySQL. Failover enacted.</b><br />
<br />
install_driver(mysql) failed: Can't load '/usr/lib/perl5/site_perl/5.8.8/x86_64-linux/auto/DBD/mysql/mysql.so' for module DBD::mysql: /usr/lib64/libmysqlclient.so.15: version `libmysqlclient_15' not found (required by /usr/lib/perl5/site_perl/5.8.8/x86_64-linux/auto/DBD/mysql/mysql.so) at /usr/lib/perl5/5.8.8/x86_64-linux/XSLoader.pm line 70.
 at /usr/lib/perl5/site_perl/5.8.8/x86_64-linux/DBD/mysql.pm line 14
Compilation failed in require at (eval 18) line 3.
Perhaps a required shared library or dll isn't installed where expected
 at /usr/local/cpanel/Cpanel/Mysql.pm line 38
 at /usr/local/cpanel/Cpanel/Mysql.pm line 45
    Cpanel::Mysql::new('Cpanel::Mysql') called at /usr/local/cpanel/bin/mysqladmin line 50
install_driver(mysql) failed: Can't load '/usr/lib/perl5/site_perl/5.8.8/x86_64-linux/auto/DBD/mysql/mysql.so' for module DBD::mysql: /usr/lib64/libmysqlclient.so.15: version `libmysqlclient_15' not found (required by /usr/lib/perl5/site_perl/5.8.8/x86_64-linux/auto/DBD/mysql/mysql.so) at /usr/lib/perl5/5.8.8/x86_64-linux/XSLoader.pm line 70.
 at /usr/lib/perl5/site_perl/5.8.8/x86_64-linux/DBD/mysql.pm line 14
Compilation failed in require at (eval 18) line 3.
Perhaps a required shared library or dll isn't installed where expected
 at /usr/local/cpanel/Cpanel/Mysql.pm line 38
 at /usr/local/cpanel/Cpanel/Mysql.pm line 45
    Cpanel::Mysql::new('Cpanel::Mysql') called at /usr/local/cpanel/bin/mysqladmin line 50
I noticed that the existing perl binary at /usr/bin/perl was symlinked to /usr/local/bin/perl. As I mentioned in the ticket, this is the reverse of how it should normally be setup, so I did the following:

Code:
mv /usr/bin/perl /usr/bin/perl.bak
rm /usr/local/bin/perl (this was just a symlink)
cp /usr/bin/perl.bak /usr/local/bin/perl
ln -s /usr/local/bin/perl /usr/bin/perl
At that point, I then forced an update of the DBD::mysql perl module:

Code:
/scripts/perlinstaller --force DBD::mysql
MySQL subsequently began working properly to list databases in cPanel on the accounts.
 

gwc_wd

Member
Oct 24, 2010
16
1
53
I've replied to the ticket. I'm going to provide details here on what I found.
And you did it very quickly and very kindly. Some of the best support I've received -- and for a user who is not a direct customer.

My sincere thanks.