Can't connect to local MySQL server through socket

本文涉及的产品
云数据库 RDS MySQL Serverless,0.5-2RCU 50GB
简介:

# mysql

ERROR 2002(HY000):Can't connect to local MySQL server through socket '/tmp/mysql.socket'

# ln -s /usr/local/mysql/data/mysql.sock /tmp/mysql.sock



ERROR 1045 (28000):Access denied for user 'root'@'localhost' (using password: NO)

说明设置了mysql密码,需要# mysql -uroot -p'密码'

设置密码cd /usr/local/mysql/bin下 # ./mysqladmin -u root password '密码'



本文转自 Mr_sheng 51CTO博客,原文链接:http://blog.51cto.com/sf1314/2073949

相关实践学习
基于CentOS快速搭建LAMP环境
本教程介绍如何搭建LAMP环境,其中LAMP分别代表Linux、Apache、MySQL和PHP。
全面了解阿里云能为你做什么
阿里云在全球各地部署高效节能的绿色数据中心,利用清洁计算为万物互联的新世界提供源源不断的能源动力,目前开服的区域包括中国(华北、华东、华南、香港)、新加坡、美国(美东、美西)、欧洲、中东、澳大利亚、日本。目前阿里云的产品涵盖弹性计算、数据库、存储与CDN、分析与搜索、云通信、网络、管理与监控、应用服务、互联网中间件、移动服务、视频服务等。通过本课程,来了解阿里云能够为你的业务带来哪些帮助     相关的阿里云产品:云服务器ECS 云服务器 ECS(Elastic Compute Service)是一种弹性可伸缩的计算服务,助您降低 IT 成本,提升运维效率,使您更专注于核心业务创新。产品详情: https://www.aliyun.com/product/ecs
相关文章
|
2月前
|
关系型数据库 MySQL 数据库
Host 'XXX' is not allowed to connect to this MySQL server 解决方案
Host 'XXX' is not allowed to connect to this MySQL server 解决方案
|
3月前
socket编程之 connect()函数
再讲了服务器端的函数调用之后,终于来到了我们的客户端编程了(read/write之后会详细介绍的),客户端编程相较于服务器端来说是非常简单的了,在掌握了服务器端编程之后再看客户端编程就会胸有成竹(只需要在学一个函数即可)。
30 0
|
4月前
|
消息中间件 关系型数据库 MySQL
在kafka connect 同步 mysql 主从数据库
在kafka connect 同步 mysql 主从数据库
45 0
|
4月前
|
Docker 容器
docker使用遇到问题Got permission denied while trying to connect to the Docker daemon socket
docker使用遇到问题Got permission denied while trying to connect to the Docker daemon socket
67 0
|
4月前
|
关系型数据库 MySQL 数据库
远程连接mysql报错:1130 - Host XXX is not allowed to connect to this MySQL server
远程连接mysql报错:1130 - Host XXX is not allowed to connect to this MySQL server
83 0
|
4月前
|
关系型数据库 MySQL Linux
MySQL【部署 01】Linux root 用户部署 mysql-5.7.28 及 not allowed to connect to this MySQL server 和中文乱码问题处理
MySQL【部署 01】Linux root 用户部署 mysql-5.7.28 及 not allowed to connect to this MySQL server 和中文乱码问题处理
51 0
|
4月前
【MySQL8】1130 - Host *** is not allowed to connect to this MySOL server
【MySQL8】1130 - Host *** is not allowed to connect to this MySOL server
|
4月前
|
关系型数据库 MySQL Linux
远程连接mySQL数据库服务器出现错误号码****:Can‘t connect to mySQL server on ‘192.168.***.***‘ (0)
远程连接mySQL数据库服务器出现错误号码****:Can‘t connect to mySQL server on ‘192.168.***.***‘ (0)
52 0
|
5月前
|
Oracle 关系型数据库 MySQL
MySQL语句执行报错You can‘t specify target table for update in FROM clause
MySQL语句执行报错You can‘t specify target table for update in FROM clause
49 0
|
5月前
|
关系型数据库 MySQL 数据库
cant connect to local MySQL server through socket /tmp/mysql.sock (2)
cant connect to local MySQL server through socket /tmp/mysql.sock (2)
101 0
cant connect to local MySQL server through socket /tmp/mysql.sock (2)