# mysql -uroot -p
Enter password:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
根据my.cnf
[mysqld]
port=23306
basedir=/usr/local/mysql
datadir=/app/data/
socket=/app/data/mysql.sock
建立软链接:
# ln -s /app/data/mysql.sock /tmp/mysql.sock