搜索
查看
编辑修改
首页
UNITY
NODEJS
PYTHON
AI
GIT
PHP
GO
CEF3
JAVA
HTML
CSS
搜索
盐析白兔
这个屌丝很懒,什么也没留下!
关注作者
热门标签
jquery
HTML
CSS
PHP
ASP
PYTHON
GO
AI
C
C++
C#
PHOTOSHOP
UNITY
iOS
android
vue
xml
爬虫
SEO
LINUX
WINDOWS
JAVA
MFC
CEF3
CAD
NODEJS
GIT
Pyppeteer
article
热门文章
1
Java:数组与字符串_java 字符串数组
2
【AI大模型应用开发实战】数据标注:标注工具与方法应用_大模型微调数据集怎么标注
3
python编程语言是什么?它能做什么?_python可以做开发语言吗
4
mysql : grant权限命令汇总_mysql grant
5
git push -u origin “master“报错_git push -u origin master 报错
6
Hbase安装流程及踩坑心得_hbase安装配置实验报告心得
7
IT博客大赛——我的写博历程和拉票方法
8
几款低代码开发平台的优缺点比较_jeecgboot与bladex对比
9
三球排序问题_有三种颜色的小球,分别代表0(红色),1(白色),2(蓝色),打乱顺序,放在数组中,让后整
10
分页存储概念清晰梳理(页面、页表、页表项、页面大小、页内地址等概念)
当前位置:
article
> 正文
ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/var mysql连不上_rror 2002 (hy000): can't connect to local mysql se
作者:盐析白兔 | 2024-06-11 12:53:18
赞
踩
rror 2002 (hy000): can't connect to local mysql server through socket
启动mysql 报错:
ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock’ (2)
1、先查看 /etc/rc.d/init.d/mysqld status 看看m y s q l 是否已经启动.
另外看看是不是权限问题.
2、确定你的mysql.sock是不是在那个位置,
mysql -u 你的mysql用户名 -p -S /var/lib/mysql/mysql.sock
3、试试:service mysqld start
4、如果是权限问题,则先改变权限 #chown -R mysql:mysql /var/lib/mysql
[root@localhost ~]# /etc/init.d/mysqld start
启动 MySQL: [ 确定 ]
[root@localhost ~]# mysql -uroot -p
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
原因是,/var/lib/mysql 的访问权限问题。
shell> chown -R mysql:mysql /var/lib/mysql
接着启动服务器
shell> /etc/init.d/mysql start
服务器正常启动后察看 /var/lib/mysql 自动生成mysql.sock文件。
但是我的问题仍然没有得到解决。
问题终于解决:
方法: 修改/etc/my.conf:
[mysqld]
datadir=/usr/local/mysql/data
socket=/var/lib/mysql/mysql.sock
[mysql.server]
user=mysql
basedir=/usr/local/mysql
If there is not currently a section called [client], add one at the bottom of the file and copy the socket= line under the [mysqld] section such as:
[client]
socket=/var/lib/mysql/mysql.sock
发现依旧如此,运行/etc/init.d/mysql start报错:Starting MySQLCouldn't find MySQL manager or server
是mysqld服务没启,运行/usr/local/mysql/bin/mysqld_safe &
问题解决
。
声明:
本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:
https://www.wpsshop.cn/w/盐析白兔/article/detail/703257
推荐阅读
article
Windows
Server
2012
R2系统
服务
器
远程桌面
服务
多用户登录配置分享...
Windows
Server
2012
系统在没有安装远程多界面的情况下,最多只能同时运行2个
远程桌面
,如果是有多个技术员...
赞
踩
article
正确解决
com
.
mysql
.
jdbc
.
exceptions
.
jdbc
4.MySQLSyntaxErr...
正确解决
com
.
mysql
.
jdbc
.
exceptions
.
jdbc
4.MySQLSyntaxErrorExceptio...
赞
踩
article
踩坑
mybatis
-plus,### Cause:
com
.
mysql
.
jdbc
.exception...
错误如图:org.springframework.
jdbc
.BadSqlGrammarException:###Erro...
赞
踩
article
com
.
mysql
.
jdbc
.
exceptions
.
jdbc
4.MySQLSyntaxError E...
1、错误描述
com
.
mysql
.
jdbc
.
exceptions
.
jdbc
4.MySQLSyntaxError Excep...
赞
踩
article
com
.
mysql
.
jdbc
.exceptions.
jdbc
4.MySQLSyntaxErrorEx...
com
.
mysql
.
jdbc
.exceptions.
jdbc
4.MySQLSyntaxErrorException: ...
赞
踩
article
Caused
by: com.
mysql
.
jdbc
.
exceptions
.
jdbc
4.MySQLSy...
错误信息:
Caused
by: com.
mysql
.
jdbc
.
exceptions
.
jdbc
4.MySQLSyntaxE...
赞
踩
article
MySQL
下出现com.
mysql
.
jdbc
.
exceptions
.
jdbc
4.
MySQL
Synta...
sql报错:Caused by: com.
mysql
.
jdbc
.
exceptions
.
jdbc
4.
MySQL
Syntax...
赞
踩
article
Caused by: com.
mysql
.
jdbc
.
exceptions
.
jdbc
4.MySQLSy...
app日志输出:Caused by: com.
mysql
.
jdbc
.
exceptions
.
jdbc
4.MySQLSynt...
赞
踩
article
Caused by:
com
.
mysql
.
jdbc
.
exceptions
.
jdbc
4.MySQLSy...
Caused by:
com
.
mysql
.
jdbc
.
exceptions
.
jdbc
4.MySQLSyntaxErrorE...
赞
踩
article
JDBC连接
MySQL
出现误com.
mysql
.
jdbc
.
exceptions
.
jdbc
4.MySQ...
##JDBC连接
MySQL
出现误com.
mysql
.
jdbc
.
exceptions
.
jdbc
4.
MySQL
SyntaxE...
赞
踩
article
internal
server
error
怎么解决_已解决R包:dependencies * are...
Rstudio-Server 在安装一些程序包的时候经常会出现这种错误:ERROR: dependency ‘calib...
赞
踩
article
MySQL
存储
函数及调用...
本文主要介绍了
MySQL
存储
函数及调用的方法,介绍了
存储
函数的示例,如何在
MySQL
中创建
存储
函数,以及介绍了
MySQL
...
赞
踩
article
【
MySQL
】
窗口
函数
原理
,
与
where
、
group
by关系...
首先
,
你需要定义一个
窗口
,
它决定了
窗口
函数
将作用的数据范围。
窗口
可以基于行号、分区键或排序键来定义。【
MySQL
】
窗口
函...
赞
踩
article
unable
t
o access ‘xx.
gi
t
/‘ Failed
t
o connec
t
t
o gi...
gi
t
config --global h
t
t
ps.proxy h
t
t
ps://127.0.0.1(地址):端口号。gi...
赞
踩
article
gi
t
Couldn‘
t
connec
t
t
o
server
_
gi
t
couldn
'
t
connec...
配置远程仓库的 ip+端口号。_
gi
t
couldn
'
t
connec
t
t
o
server
gi
t
couldn
'
t
c...
赞
踩
article
mysql
表
结构
变动
监控
_自动
监控
MySQL
表
结构
变更脚本-阿里云开发者社区...
如何
监控
MySQL
数据库
表
结构
和
表
变更,并通知到相关的联系人、实现报警或通知?由于平台采用django系统实现,因此通过...
赞
踩
article
idea
拉取gi
t
代码报错:
Failed
t
o
connec
t
t
o 10.65.14.32 por...
看看这个端口服务到底通没通,通过
t
elne
t
端口发现真的不通。1.在h
t
t
p协议克隆地址ip后加端口进行访问。1.确定端...
赞
踩
article
Failed
t
o
connec
t
t
o
gi
t
hub
.com
por
t
443
af
t
er
210...
Failed
t
o
connec
t
t
o
gi
t
hub
.com
por
t
443
af
t
er
21086 ms: Cou...
赞
踩
article
MySQL:DQL(
数据
查询
)语句(一):基本
查询
、模糊
查询
、
聚合
函数
、
having
子句_
数据
库模糊...
一、select语句:1.普通
查询
:a、查找全部Values select * from 表名b、查找部分列值 sele...
赞
踩
article
MySQL
:
DQL
数据
查询
语句
盘点_
distinct
属于dql
语句
吗...
本篇内容包括:
DQL
的简介、SELECT
语句
、WHERE 条件
语句
、JOIN 连接
查询
(多表
查询
)和分组、过滤、排序...
赞
踩
相关标签
windows
服务器
运维
mysql
数据库
算法
bug
java
mybatis
Java
jdbc
exception
MySQLSyntaxErrorException
internal server error怎么解决
存储函数
触发器