安装 MySQL 完成并启动后,执行匿名用户登录语句报错。
mysql -ux3
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
增加软连接,命令如下:
ln -s /var/lib/mysql/mysql.sock /tmp/mysql.sock