I just tried to uninstall MySQL on Debian via
apt-get remove --purge mysql-server apt-get remove --purge mysql-client apt-get autoremove
and wondered that the directories /var/lib/mysql /etc/mysql still existed after the commands. Then I recognized, that a
apt-get remove --purge 'mysql-server.*'
is doing better and removes everything.
Note:
if you get a
/etc/init.d/mysql: WARNING: /etc/mysql/my.cnf cannot be read.
error when you try to re-install MySQL, try a
apt-get purge mysql-common
and try to re-install again.