CentOS7下安装MYSQL遇到的问题:
登录时有可能报这样的错:ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock’ (2),原因是/var/lib/mysql的访问权限问题。下面的命令把/var/lib/mysql的拥有者改为当前用户:
sudo chown -R openscanner:openscanner /var/lib/mysql
若有报错:chown: 无效的用户: "openscanner:openscanner"
更换命令为:chown root /var/lib/mysql/
参考于该文章内容,链接:
网友评论