admin管理员组文章数量:1567301
linux安装mysql后运行mysql_secure_installation时报如下错误
NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB
SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY!
In order to log into MariaDB to secure it, we'll need the current
password for the root user. If you've just installed MariaDB, and
you haven't set the root password yet, the password will be blank,
so you should just press enter here.
Enter current password for root (enter for none):
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
经过排查是因为数据库未启动。运行如下命令后,解决此问题,处理完成后再次进行数据库初始化,设置密码
systemctl start mariadb
数据库成功登录
本文标签: 错误LocalmysqlconnectServer
版权声明:本文标题:ERROR2002 (HY000): Can‘t connect to local MySQL server through socket ‘varlibmysqlmysql.sock‘ 错误 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:https://www.elefans.com/dianzi/1725806780a1044134.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论