There was some discussion here about this error in a different circumstance (search on mysqld.sock found it).

One thing that has been discovered is that if you have done an upgrade-dist to an EmonSD image you will fall foul of this issue.

What is your starting point (EmonSD?), what modifications do you need and what are the resultant issues that leads you to install phpMyAdmin to fix them?