mysql - 在 CentOS 8 上安装 mysql-server 时出错
问题描述
Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
有人可以解释为什么我收到此错误以及如何在安装时解决它mysql-server
吗mysql_secure_installation
?
同样,安装时出现错误maridb-server
。
[root@servera-clone ~]# 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)
Enter current password for root (enter for none):
谢谢
解决方案
推荐阅读
- php - 在阿里巴巴 ECS 上使用 SSL 的视频流
- pyspark - 在 PySpark 中对具有空值的列应用计数、总和等聚合函数时出现问题
- activemq-artemis - Apache Artemis 没有 clientId 显示在 management-console.UI 的使用者部分
- mysql - 使用 sql 和 vb.net 将条目更改为指定范围数
- java - 使用流过滤 POJO 列表 - 无法投射 ClassCastException java.util.LinkedHashMap
- amazon-web-services - 如何将 iam:PermissionsBoundary 添加到通过 CloudFormation 模板创建的角色
- mysql - 无法添加或更新子行:
- java - 在java JDBC中将参数附加到准备好的语句并打印查询
- javascript - 类型错误:MOD.hasPermissions 不是函数
- email - 在 mailgun 上使用子域时如何接收发送到 rootdomain 的电子邮件?