Repair and Optimize MySQL databases in SSH
SSH repair and optimize all MySQL databases:
/usr/bin/mysqlcheck --repair --all-databases --password
/usr/bin/mysqlcheck --optimize --all-databases --password=xxxxxx
A web and systems development journal (from a–too busy–web developer who does a lot of various IT work.)
/usr/bin/mysqlcheck --repair --all-databases --password
/usr/bin/mysqlcheck --optimize --all-databases --password=xxxxxx
In case your mysqld won't work with
# service mysqld restart
or
# service mysqld start
or
# service mysqld stop
do this:
# killall mysqld
Install/Update eaccelerator:
cd /ea
rm -rf ./eaccelerator*
rm -rf /usr/local/lib/php/extensions/no-debug-non-zts-*
wget http://downloads.sourceforge.net/project/eaccelerator/eaccelerator/eAccelerator%200.9.6.1/eaccelerator...
tar xvfj eaccelerator-0.9.6.1.tar.bz2
cd eaccelerator-0.9.6.1
export PHP_PREFIX="/usr/local"
$PHP_PREFIX/bin/phpize
./configure --enable-eaccelerator=shared --with-php-config=$PHP_PREFIX/bin/php-config
make
make install
cd /tmp
rm -fr /tmp/eaccelerator
mkdir /tmp/eaccelerator
chmod 0777 /tmp/eaccelerator
vi /usr/local/lib/php.ini
Add/Edit right after "Windows Extensions":
zend_extension="/ea/eaccelerator-0.9.5.3/modules/eaccelerator.so"
eaccelerator.shm_size="32"
rm /var/cpanel/mysqlup
That will stop upcp from touching MySQL.
To upgrade manually
If you upgrade manually you need to remember to create the file:
#touch /etc/mysqlupdisable
(Otherwise upcp will simply downgrade it again.)
SitePoint
MysqlConnectClass (good explanation of thinking the OOP way):
http://www.sitepoint.com/forums/showpost.php?p=683454&postcount=4
Advanced PHP Resources:
http://www.sitepoint.com/forums/showthread.php?t=78687