error on accessing MySQL

I installed MySQL 5.5.31 via SimpleGroupware 0.75 through ports on FreeBSD 9.1 (TrueOS), but cannot access the database, either directly with the command mysql -u root -p'password' or via the installed Webmin port 1.6.50; both with error message:
Code:
"Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)".
How do I overcome this problem?
 
Usually you get this error when MySQL is not running. What is the output of # ps -ax | grep mysql?

If MySQL is running you should see something like:

Code:
 1306 ??  Is       0:00.01 /bin/sh /usr/local/bin/mysqld_safe --defaults-extra-file=/var/db/mysql/my.cnf --user=mysql --d
 1425 ??  I        4:43.12 /usr/local/libexec/mysqld --defaults-extra-file=/var/db/mysql/my.cnf --basedir=/usr/local --da
81718  0  RL+      0:00.00 grep mysql
 
Back
Top