当前位置:网站首页>Mac can't connect to local MySQL server through socket '/tmp/mysql Sock '(2) problem
Mac can't connect to local MySQL server through socket '/tmp/mysql Sock '(2) problem
2022-07-24 06:49:00 【cxcaln】
Mac solve Can’t connect to local MySQL server through socket ‘/tmp/mysql.sock’ (2) problem
I am here mac Computer installation mysql, Found connection failed :
MacBook-Pro:etc chenxianchong$ mysql -uroot -p
Enter password:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
The reason is simple , Can't find /tmp/mysql.sock This file , The solution is as follows :
1、 modify my.cnf file , Usually in /etc/my.cnf Directory 
Enter this file to modify , Put the previous socket = /tmp/mysql.sock Comment out , Then change another address
2、 Assign 777 jurisdiction
sudo chmod 777 /etc/mysqlsock/mysql.sock
3、 restart mysql
sudo /usr/local/mysql/support-files/mysql.server restart
And then we'll try again mysql -uroot -p Found that you can log in
边栏推荐
- Mac解决 Can‘t connect to local MySQL server through socket ‘/tmp/mysql.sock‘ (2)问题
- 【USB电压电流表】基于STM32F103C8T6 for Arduino
- Redis basic type - combined with set
- Redis基本类型-哈希Hash
- Special effects - bubble tailing occurs when the mouse moves
- [small object velocimeter] only principle, no code
- You don't know these pits. You really don't dare to use BigDecimal
- [audio decoding chip] Application of vs1503 audio decoding chip
- Yiwen node installation, download and configuration
- Directory and file management
猜你喜欢

Redis入门

Redis.conf详解

Learn more about when to use MySQL two locks (table lock and row lock)

DHCP principle and configuration

【LVGL(重要)】样式属性API函数及其参数

类加载的过程(生命周期)详情分析

MGR_mysqlsh_keepalive高可用架构部署文档

基于回归分析的广告投入销售额预测——K邻近,决策树,随机森林,线性回归,岭回归

Take you to understand the inventory deduction principle of MySQL database
![[lvgl (1)] a brief introduction to lvgl](/img/2e/2e155f1d3669c27ad1b090ca954224.png)
[lvgl (1)] a brief introduction to lvgl
随机推荐
Experiment: disk quota operation
磁盘管理和文件系统
Sealos 打包部署 KubeSphere 容器平台
String question
Redis data type -string (string type)
分组后返回每组中的最后一条记录 GROUP_CONCAT用法
DHCP principle and configuration
Solution: exit status 1 and exit status 145 appear when the console uses NVM to control the node version
账号和权限管理
[lvgl (6)] display Chinese settings and make Chinese font
(静态,动态,文件)三个版本的通讯录
一个AI玩41个游戏,谷歌最新多游戏决策Transformer综合表现分是DQN的两倍
[lvgl] [stage summary 1]
Detailed analysis of the process (life cycle) of class loading
[lvgl layout] grid layout
【LVGL(5)】标签的(label)用法
Redis基本类型-有序集合Zset
kubernetes 的Deployment(部署),Service概念,动态扩缩容
STM32基于 FatFs R0.14b&SD Card 的MP3音乐播放器(也算是FatFs的简单应用了吧)
NFS shared services and experiments