Clean up binlog files

If you care having disk space issues because your MySQL bin logs are too big you can delete older ones using this simple MySQL query:


This example will keep 21 days of binlogs, set the interval as needed. Btw, if you are using MySQL replication, this command will not be replicated (good!).


USB stick read only

If you cannot write on your USB stick on Debian please check if you have entries like this in your /etc/fstab file.

/dev/sdb1       /media/usb0     auto    rw,user,noauto  0       0
/dev/sdb2       /media/usb1     auto    rw,user,noauto  0       0

If you do, please comment them out, restart your computer and try to mount your USB stick again.


vulnerable to POODLE

How can I detect if my website is vulnerable to POODLE?

You can use Nmap to check if your site is vulnerable to POODLE by supporting SSLv3.

nmap --script ssl-enum-ciphers -p 443

If it is and you are running Apache you can disable SSLv3 in your virtual host by add the line

SSLProtocol All -SSLv2 -SSLv3

For more information and Nginx and other services please see


mysqladmin flush-hosts

After entering the wrong MySQL password I receive the message “ERROR 1129 (HY000): Host is blocked because of many connection errors; unblock with ‘mysqladmin flush-hosts'” and can no longer log in, what can I do?

Connect to MySQL from another host and run the SQL command “flush hosts”. If you have phpMyAdmin installed on the MySQL server you can also connect from your current host, the connection will be seen as coming from localhost.


pyhton 2 complaining about PKCS12 format

If gam (the Google Apps Manager) on Debian shows an error like

NotImplementedError: PKCS12 format is not supported by the PyCrpto library. Try converting to a “PEM” (openssl pkcs12 -in xxxxx.p12 -nodes -nocerts > privatekey.pem) or using PyOpenSSL if native code is an option.

you are probably missing the python openssl package. Install it with

sudo apt-get install python-openssl

For Python 3 you will need python3-openssl instead.