PhpMyAdmin installer for Ubuntu 12.X 13.X has problems when reinstalling.
I noticed this bug for several years but never bothered to complain because it just happens if you screw your installation and thought it would be fixed in the meantime given how common phpmyadmin is.
However years passed and it's still there.
Steps to reproduce: have a working phpmyadmin installation with mysql admin user and password equal to phpmyadmin ones (it should not matter but I just say it) uninstall completely phpmyadmin with synaptic and reinstall, the installer asks whether to delete also the database, reply yes and you get an error asking to abort or retry, abort.
Now try reinstalling and you'll get:
E: Sub-process /usr/bin/dpkg returned an error code (1)
if you insist you will be able to finally install it but the phpmyadmin database will have empty tables and /usr/lib/phpmyadmin/config.inc.php will be emtpy.
So give up installing from package and download phpmyadmin zip file, unzip it and create config directory, create config file and move it at the top layer with correct permissions.
Try to login and you get a 1045 error, this is due to the fact the database phpmyadmin doesn't exist.
Only way I solved this for now is adding:
$cfg['Servers'][$i]['AllowNoPassword'] = true;
which of course isn't such a good idea for production.
Sorry if description is generic but really it's just a metter of trying reinstalling phpmyadmin under Ubuntu and letting all kind of errors happen.