Howto: Fix MySQL Server dependency problems on Ubuntu LTS

Have you encountered this error?

An error occurred while setting the password for the MySQL administrative user.
This may have happened because the account already has a password, or because of a
communication problem with the MySQL server.

Or maybe seen this?

Errors were encountered while processing:
mysql-server-5.5
mysql-server

Or this?


dpkg: error processing package mysql-server (--configure):
dependency problems - leaving unconfigured

This is a total bastard of a problem. Here’s what worked for me:

sudo apt-get purge mysql-server mysql-client mysql-common mysql-server-5.5
sudo dpkg --purge mysql*
sudo rm -rf /etc/mysql
sudo apt-get install -f
sudo dpkg --configure -a
sudo apt-get update
sudo apt-get upgrade
sudo apt-get dist-upgrade
sudo apt-get autoremove
sudo apt-get autoclean
sudo apt-get install mysql-server
sudo reboot

Purge everything that even looks like mysql. Remove the /etc/mysql directory manually, because mysql-common is going to try to hide there. Fix any broken dependencies and reconfigure any broken packages. You may get the same error again when trying to reinstall mysql-server. I threw up my hands and went to bed at that point, woke up this morning deciding to finally learn PostgreSQL, got this error:

E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable)

and believe it or not, a reboot fixed the problem for me. mysqld started on reboot. I rubbed my eyes, and wrote this post in case it ever bloody well happens again.

How to play Amazon Instant Videos on Ubuntu/Kubuntu Raring Ringtail 13.04 with Firefox

We’re all aware that there are issues with Flash and playing streaming videos on Linux. You can’t play AIV on Chrome; you’ll get that annoying “If you’re using the Chrome browser with Linux, you must disable PPAPI to continue using Amazon Instant Video. You can also use a different Web browser, like Firefox. Learn more” message. Just use FF for now to play AIV. At least you’re not using Wine. So, let’s solve your real problem.

Having trouble playing Amazon Instant Videos on Firefox? Have you seen this message?

“Sorry we were unable to stream this video. This is likely because your Flash Player needs to be updated.”

Here’s how to handle this.

sudo add-apt-repository "deb http://archive.canonical.com/ $(lsb_release -sc) partner"

sudo apt-get update && sudo apt-get install flashplugin-installer

sudo apt-get install hal -y

sudo mkdir /etc/hal/fdi/preprobe

sudo mkdir /etc/hal/fdi/
information

/usr/sbin/hald --daemon=yes --verbose=yes

rm -rf ~/.adobe

Now, go restart Firefox, and you should be good.

With thanks to:

http://www.liberiangeek.net/2013/03/install-adobe-flash-player-in-ubuntu-12-10-13-04-raring-ringtail/

and

http://askubuntu.com/questions/286297/is-there-a-work-around-to-get-protected-hulu-or-amazon-prime-instant-videos-work