Recently, I encountered many problems when installing Aphace, mysql, and php on Linux. The problems encountered when installing apache and php were simpler and could be solved by searching on Baidu or Google. However, I encountered a problem when installing mysql that troubled me for a long time. I am using Ubuntu 7.0. When I installed MySQL, I always got an error when I ran mysqladmin version: can't connect to local MySQL server through socket 'var/run/mysqld/mysqld.sock' This almost made me collapse. I searched for many solutions on the Internet, and there are probably several solutions: 1. Permission issues 2. Modify the /etc/my.cnf file 3. Operating system or MySQL upgrade 4. Create /var/run/mysqld/mysqld.sock I have tried all the above methods, but none of them solved the problem. I'm about to give up, but I think if I hold on a little longer, I'll be able to solve it. I am going to send an email to easychen and zoltan for advice. When I was about to send the email, I wondered if I could change my mindset. My idea is: since That is: Something unexpected happened and the problem was solved. I am so happy. Although the problem is solved, I don't know why it is like this. Why is the default /var/run/mysqld /mysqld.sock? I checked in the my.cnf file, and the socket path in the client and mysqld is /tmp/mysql.sock, and the socket specified at compile time is also /tmp/mysql.sock! This is really a bit confusing, it seems I need to look for the answer on the Internet! I hope people in the know can give me some advice. Next, I will introduce the liunx mysql.sock problem to you separately.
mysql.sock is not in the /var/lib/mysql directory at all. Your own directory is in /tmp/mysql.sock So a connection was made. ln -s /tmp/mysql.sock /var/lib/mysql/mysql.sock Just restart it Note: ln usage: ln -s source file target file ln command details: Summarize The above is the editor's introduction to the installation of MySQL and mysql.sock under Linux. I hope it will be helpful to everyone. If you have any questions, please leave me a message and the editor will reply to you in time. I would also like to thank everyone for their support of the 123WORDPRESS.COM website! You may also be interested in:
|
<<: Summary of Linux command methods to view used commands
>>: Diving into JS inheritance
Introduction to Linux alarm function Above code: ...
Today a client wants to run an advertisement, and ...
Preface While browsing GitHub today, I found this...
Table of contents background Achieve a similar ef...
A MySQL custom value is a temporary container for...
Copy code The code is as follows: <!DOCTYPE ht...
Table of contents Preface Array.prototype.include...
Joint Index The definition of the joint index in ...
Preface A character set is a set of symbols and e...
Table of contents Application Scenario Simply put...
Problem Description There is a type of query call...
This article shares the specific code of JavaScri...
Solution: Directly in the directory where you dow...
at at + time at 17:23 at> touch /mnt/file{1..9...
Let’s take a look first. HTML source code: XML/HT...