使用Ubuntu16.04出现的问题:mysql: [Warning] Using a password on the command line interface can be insecure. ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/var/run/mysqld/mysqld.sock’ (2),原因是因为丢失mysqld.sock文件。
xxx@ubuntu:~$ mysql -uroot -pmysql
mysql: [Warning] Using a password on the command line interface can be insecure.
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2

在Ubuntu16.04上遇到MySQL连接问题,错误提示包括安全性警告和2002错误。原因是mysqld.sock文件丢失。解决步骤包括检查配置文件,修改目录权限,启动服务,建立软链接以恢复mysql.sock文件,并最终成功连接到MySQL数据库。
最低0.47元/天 解锁文章
1万+

被折叠的 条评论
为什么被折叠?



