当前位置:网站首页>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
边栏推荐
- LM393 voltage comparator and its typical circuit introduction
- Browser local storage
- 随机森林、LGBM基于贝叶斯优化调参
- SparkSQL核心使用,220724,
- NFS shared services and experiments
- 机器学习案例:孕妇吸烟与胎儿健康
- You don't know these pits. You really don't dare to use BigDecimal
- 【LVGL(4)】对象的事件及事件冒泡
- Special effects - click the mouse and the randomly set text will appear
- adb交互-干掉难看的默认shell界面
猜你喜欢

Kubernetes' deployment, service concept, dynamic capacity expansion
![[lvgl (2)]](/img/f8/d04183cf74896295382765a9dfd88d.png)
[lvgl (2)]

I have seven schemes to realize web real-time message push, seven!

【ESP8266点焊机】基于 ESP8266 for Arduino

Redis special data type hyperloglog

【波形/信号发生器】基于 STC1524K32S4 for C on Keil

实验:LVM逻辑卷的建立、扩容、与删除

类加载的过程(生命周期)详情分析
![[lvgl layout] grid layout](/img/36/47f586f3dc1a114ed7775c4e190872.png)
[lvgl layout] grid layout

我有 7种 实现web实时消息推送的方案,7种!
随机推荐
mysql获取自增行标(区别mysql版本)
类的加载器 和 双亲委派机制详解
创建WPF项目
[esp8266 spot welder] Based on esp8266 for Arduino
Special effects - click the mouse, and a random color of love will appear
【LVGL(4)】对象的事件及事件冒泡
Why can't index be the key of V-for?
Identification of Chinese medicinal materials
【USB电压电流表】基于STM32F103C8T6 for Arduino
Write blog at leisure ~ briefly talk about let, VaR and Const
Special effects - cobweb background effects
记录PHPSerializer工具类反序列化遇到的坑
Write cookies, sessionstorage, localstorage and session at will
Jenkins CI CD
postgresql 日期处理函数用法
Learn more about when to use MySQL two locks (table lock and row lock)
PostgreSQL date handler usage
Several common problems of SQL server synchronization database without public IP across network segments
SSH Remote Access and control
String question