I have intalled Alfresco Community 3.4.d on an Ubuntu Server 10.04 server using the quick install with the bundled mysql database. The Ubuntu server only had ssh installed; mysql was not installed. When I use the mysqldump command:
mysqldump -u root -p –default-character-set=latin1 -N alfresco > backup.sql
I get this error:
mysqldump: Got error: 2002: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) when trying to connect
I have discovered that there are two my.cnf files on the server, one at /etc/mysql, and the other at /opt/alfresco-3.4.d/mysql. Each points to a different mysqld.sock. The /etc/mysql/my.cnf points to the one referenced in the error message and the other points to /opt/alfresco-3.4.d/mysql/tmp/mysql.sock.
Where do I need to look to re-direct the mysqldump command to the correct socket? A search shows two copies of the command, one under /usr/bin the other under /opt/alfresco-3.4.d/mysql/bin.