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
Table of contents Object Object Definition Iterat...
Ubuntu 15.04 opens MySQL remote port 3306. All th...
<div class="box"> <img /> &...
Table of contents Overview Example Why is it need...
Table of contents Docker-Maven-Plugin Maven plugi...
Types of Indexes in MySQL Generally, they can be ...
1. Download https://dev.mysql.com/downloads/mysql...
Table of contents 1. Scenario Description 2. Solu...
#1. Download # #2. Unzip to local and modify nece...
Command to add a route: 1.Route add route add -ne...
Regarding the nginx panic problem, we first need ...
Table of contents 1. Background 2. Operation step...
Core code <!DOCTYPE html> <html lang=&qu...
Preface What is data type conversion? The default...
1. Basic knowledge: Http Header User-Agent User A...