- android - RelativeLayout 背景可绘制重叠内容
- android - 如何链接 cpufeatures lib 以获取 native android 库?
- java - OnItemClickListener 不起作用,但 OnLongItemClickListener 在自定义 ListView 中起作用
- java - Android 文件转字符串
我正在尝试在我自己的计算机上运行本地 mysql 服务器。我丢失了最初设置的密码。当我尝试连接到 mysql 时,出现以下错误:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
因此我尝试了 these steps重置我的 MySQL 密码,但是行
mysql -u root mysql
返回相同的错误信息:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
运行命令时
mysqladmin -u root -p statusI get the following message:error: 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)'
Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists!
我一直在检查,提到的文件 (/var/run/mysqld/mysqld.sock) 实际上并不存在。我不确定是什么原因造成的。
我在网上尝试了几个解决方案,包括 this , this , this和 this但是这些解决方案都不适合我。我想补充一点,mysql-server 安装在我的机器上。
感谢任何帮助。如果对上述陈述有任何混淆,请接受我的道歉。我试图尽可能多地解释正在发生的事情,但我是一个初学者,我对那里正在发生的事情一无所知。
最佳答案
1) 使用此命令停止 mysql 恶魔进程:
sudo /etc/init.d/mysql stop
2) 使用此命令的 --skip-grant-tables 选项启动 mysqld demon 进程
sudo /usr/sbin/mysqld --skip-grant-tables --skip-networking &
Because you are not checking user privs at this point, it's safest to disable networking. In Dapper, /usr/bin/mysqld... did not work. However, mysqld --skip-grant-tables did.
1) 使用此命令启动mysql客户端进程
mysql -u root
2) 从 mysql 提示符下执行此命令以能够更改任何密码
FLUSH PRIVILEGES;
3) 然后重置/更新您的密码
SET PASSWORD FOR root@'localhost' = PASSWORD('password');
4) 如果你有一个可以从任何地方连接的 mysql root 帐户,你还应该这样做:
UPDATE mysql.user SET Password=PASSWORD('newpwd') WHERE User='root';
一旦收到指示查询成功的消息(一个或多个行受影响),刷新权限:
FLUSH PRIVILEGES;
然后停止 mysqld 进程并用经典方式重新启动它:
sudo /etc/init.d/mysql stop
sudo /etc/init.d/mysql start
这是从https://help.ubuntu.com/community/MysqlPasswordReset借来的,您还可以检查另一种重置 mysql 密码的方法。
关于mysql - 重置 MySQL 密码并丢失 mysqld.sock 文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38095018/
我在使用 IdHTTP 客户端组件时遇到一般 Indy 错误结合 SOCKS5 代理服务器并使用 SSL。 如果我将 IdHTTP 组件与我的 SOCKS5 代理(和非 https URL)一起使用,
使用代理连接(HTTP 代理:10.3.100.207,端口 8080)。 使用 python 的 request 模块的 get 函数,得到以下错误: “无法从 socks://10.3.100.2
如何为我的应用程序添加 SOCKS 支持?我在哪里可以得到库? 最佳答案 来自 http://java.sun.com/javase/6/docs/technotes/guides/net/proxi
我正在设置一个安装和配置了 docker 的基础镜像,这样当我运行我的 jenkins 管道时我可以进行 anchor 扫描。我必须将 anchor 图像拉到 docker 图像中,因为我的管道在 d
我提供了一个工作客户端和服务器文件。客户端向服务器发送图片。当你注释掉时: data = sock.recv(1024) print("received: ",str(data,"UTF-8")) 图
为什么我的 SOCKS 代理代码抛出 SocketException: Malformed reply from SOCKS server?我试过在 URLConnection 或其他中设置,但这不起
您好,我刚刚下载了适用于 OS X 10.11 的 mysql 5.7.13,我在让 phpmyadmin 连接它时遇到问题。 我能够完全安装 mysql,打开 mysql 服务器并设置 root 密
我正在尝试从容器内部控制主机 docker 服务。 对于 Linux 主机和 Linux 容器,通常是这样完成的:docker run -it -v/var/run/docker.sock:/var/
我正在使用将执行 docker 命令(docker ps 等)的图像设置 kubernetes 部署。 我的 yaml 如下所示: kind: Deployment apiVersion: apps/
我使用 this guide 安装 docker .我正在使用 Distributor ID: Ubuntu Description: Ubuntu 13.10 Release: 13.1
我正在使用以下命令启动docker: /usr/bin/dockerd --bip=172.30.224.1/21 --ip-masq=false --mtu=1450 --containerd=/r
我刚注册到 Stack Overflow,因为从 2 天前开始我真的无法摆脱这个问题。我使用 Xampp。 所以,我正在关注这个 Laravel tutorial当我从终端输入项目目录或每个其他目录
首先,我发誓我已经查看了涉及此错误的每一个问题。几乎每个人提供的解决方案都是不同的,而且似乎没有人理解错误的系统原因。我和网络上遇到这个常见问题的许多人需要的是对实际出了什么问题的解释。 基本上,当我
Magento 显示“处理您的请求时出错” 尝试命令“sudo service mysqld restart”但启动失败 然后看到日志显示“SQLSTATE[HY000] [2002] 没有这样的文件
Ubuntu 15.04 64位,docker 1.6.1,用户在docker组中。 操作系统启动后,每个docker命令执行都会导致此错误: FATA[0000] Get http:///var/r
我的问题开始于我无法再以 root 身份登录我的 mysql 安装。我试图在没有打开密码的情况下运行 mysql...但是每当我运行命令时 # mysqld_safe --skip-grant-tab
我的问题开始于我在安装 mysql 时无法再以 root 身份登录。我试图在没有打开密码的情况下运行 mysql ......但是每当我运行命令时 # mysqld_safe --skip-grant
简单明了,谁能解释一下如何通过代理 (socks4/5) 连接到 mysql 服务器。最好通过 mysql 命令行(尽管在客户端中没有选项)。 如果无法通过 mysql 命令行,那么任何其他方法都可以
简单明了,谁能解释一下如何通过代理 (socks4/5) 连接到 mysql 服务器。最好通过 mysql 命令行(尽管在客户端中没有选项)。 如果无法通过 mysql 命令行,那么任何其他方法都可以
我试图通过与 SoX 中的脉冲响应进行卷积来应用混响。以下 shell 脚本完全符合我的要求: #!/usr/bin/env bash # # Convolve audio file with and
我是一名优秀的程序员,十分优秀!