当前位置:网站首页>MySQL cannot find mysql Temporary solution of sock file
MySQL cannot find mysql Temporary solution of sock file
2022-06-30 18:25:00 【Selondier】
An error occurred when connecting to the database :Can 't connect to local MySQL server through socket '/tmp/mysql.sock '(2) ";
reason :1)mysql The service didn't start ;2)sock File path setting error ;3)sock The permission of the directory where the file is located ;4) This file is lost directly
1) Check whether the service is started
2) stay my.cnf View in file socket The path specified by the parameter , Check whether the path has access rights
3) Go to this path to check whether it exists mysql.sock file , If sock file does not exist , Try to use find Command to search the file , If the search fails , It can be restarted mysql service , It will automatically generate a . Then copy the file to soctek The path specified by the parameter . Or create a soft link , For example, this file is in /var/lib/mysql.sock,socket The path specified by the parameter is /tmp/mysql.sock. We can create :ln -s /var/lib/mysql.sock /tmp/mysql.sock, After creation , Retry connection
4) If still wrong , You can use TCP/IP To connect
mysql -u root -h Database server's IP -p
or mysql -u root -h 127.0.0.1 -p
边栏推荐
- 抖音最新Xbogus,signature生成js逆向分析
- The new Post-00 Software Test Engineer in 2022 is a champion
- 基於SSH的網上商城設計
- 基于SSH的通讯网络电子计费系统
- Apache parsing vulnerability (cve-2017-15715)_ Vulnerability recurrence
- Type ~ storage ~ variable in C #
- Zero foundation can also be an apple blockbuster! This free tool can help you render, make special effects and show silky slides
- MySQL找不到mysql.sock文件的临时解
- Talk about the SQL server version of DTM sub transaction barrier function
- Redis (IX) - enterprise level solution (II)
猜你喜欢

Inventory in the first half of 2022: summary of major updates and technical points of 20+ mainstream databases

Deep understanding of JVM (IV) - garbage collection (I)

Talk about the SQL server version of DTM sub transaction barrier function

每日面试1题-如何防止CDN防护被绕过

助力极致体验,火山引擎边缘计算最佳实践

C# Winform程序界面优化实例

Daily interview 1 question - how to prevent CDN protection from being bypassed

Deep understanding of JVM (VI) -- garbage collection (III)

Redis (IX) - enterprise level solution (II)

漏洞复现----38、ThinkPHP5 5.0.23 远程代码执行漏洞
随机推荐
Vs Code treeview TreeView
Another CVPR 2022 paper was accused of plagiarism, and Ping An insurance researchers sued IBM Zurich team
火山引擎入选国内首个《边缘计算产业全景图》
Php8.0 environment detailed installation tutorial
Optimization of interface display for general kernel upgrade of mobo video management system v3.5.0
Do you write API documents or code first?
Dropout: immediate deactivation
Tide - 基于 async-std 的 Rust-web 框架
MySQL advanced - basic index and seven joins
ASP. Net password encryption and password login
又一篇CVPR 2022论文被指抄袭,平安保险研究者控诉IBM苏黎世团队
助力极致体验,火山引擎边缘计算最佳实践
Talk about the SQL server version of DTM sub transaction barrier function
In distributed scenarios, do you know how to generate unique IDs?
[machine learning] K-means clustering analysis
MySQL找不到mysql.sock文件的临时解
Simulation of campus network design based on ENSP
Redis (I) - data type
分布式场景下,你知道有几种生成唯一ID的方式嘛?
Solve the problem of unable to connect to command metric stream and related problems in the hystrix dashboard