Fix for Cpanel update that breaks mysqlhotcopy
The recent upgrades of Cpanel have been a pain because they've broken mysqlhotcopy. Not kosher. Fortunately fixing this is pretty straightforward by simply downgrading the DBD module of Perl, on which mysqlhotcopy relies.
The recent upgrades of Cpanel have been a pain because they've broken mysqlhotcopy
. Not kosher. Fortunately fixing this is pretty easy, by simply downgrading the DBD module of Perl, which mysqlhotcopy
relies on.
Usually the error is something like this:
To solve this, simply downgrade the DBD to version 4.001. Create a script anywhere on your root folder as, say, dbd-downgrade.sh
:
1 2 3 4 5 6 7 8 9 | #!/bin/sh cd /usr/src wget -O dbd.tar.gz "http_//search.cpan.org/CPAN/authors/id/C/CA/CAPTTOFU/DBD-mysql-4.001.tar.gz" gzip -cd dbd.tar.gz | tar xf - rm -rf dbd.tar.gz cd DBD-mysql-4.001 perl Makefile.PL make make install |
Then of course chmod
the file to executable (644) and run it:
Then try your mysqlhotcopy
command again. It should work. The only thing to consider is that if your Cpanel is setup to upgrade automatically, it may rebuild DBD. You may need to downgrade the DBD again, until this thing is fixed!
If after this update, you see the error for RELOAD privileges, like this…
DBD::mysql::db do failed: Access denied; you need the RELOAD privilege for this operation at /usr/bin/mysqlhotcopy line 472.
…then simply login to mysql as "root" user through the root SSH terminal, and execute the following command:
mysql> grant all privileges on *.* to root@localhost; mysql> flush privileges;
Done. That should do it. Let me know if it doesn't.
A more long term fix
MySQL bug list has a couple of suggested fixes. If you are comfortable with Perl, you can edit the code in /usr/bin/mysqlhotcopy
and have it solved in a better way.
RECENT COMMENTS