In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Error message:
ERROR 2002: Can't connect to local MySQL server through socket'/ tmp/mysql.sock'
Solution:
/ usr/local/mysql/bin/mysqladmin-u root >-S / var/lib/mysql/mysql.sock password 'your.passwd'
Or make a soft connection.
Ln-s / var/lib/mysql/mysql.sock / tmp
Reason:
In fact, the prompt can not find / tmp/mysql.sock sometimes is not / tmp directory does not have this file, is the startup command is wrong.
/ usr/local/mysql/bin/mysql-u root-p/usr/local/mysql/bin/mysqld-- user=mysql&/usr/local/mysql/bin/mysqld-- user=root&/usr/local/mysql/bin/mysqld_safe-- user=root&/usr/local/mysql/bin/mysqld_safe-- user=mysql&/usr/local/mysql/bin/safe_mysqld--uer=root& (note that safe_mysqld is different from mysqld_safe, & indicates that mysql is running in the background)
Error message:
STOPPING server from pid file / usr/local/mysql/data/localhost.localdomain.pid 060304 11:46:21 mysqld ended
Solution:
This is a question of permissions. My mysql directory belongs to root users and also belongs to the root group. It is no problem to start with mysqld_safe. Just pay attention to these mysql,safe_mysqld,mysqld_safe,mysqld,mysqladmin. Try a few more times. In fact, sometimes mysql has started normally. Check to see if mysql starts the command.
Ps-aux | grep mysqld
You will see something similar to the following
Mysql 6394 0.0 1.5 10528 992 pts/3 S 16:16 0:00/usr/local/mysql/mysql 6395 0.0 1.5 10528 992 pts/3 S 16:16 0:00/usr/local/mysql/mysql 6396 0.0 1.5 10528 992 pts/3 S 16:16 0:00/usr/local/mysql/root 6422 0.0 1.1 2408 732 pts/3 S 16:20 0:00 grep mysql
Check to see if mysql is listening for port commands
Netstat-tl | grep mysql
You will see something similar to the following
Tcp 0 0 *: mysql *: * LISTEN
Summary
The above is the whole content of this article. I hope the content of this article has a certain reference and learning value for everyone's study or work. Thank you for your support. If you want to know more about it, please see the relevant links below.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.