Most posts on a given day

select date_format(time, '<a href="/%Y/%m/%d/">%d/%m/%Y</a>') as Day, count(*) as Posts from columnc group by Day order by Posts desc limit 30

Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)