Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

The role of socket in mysql

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

This article mainly explains "the role of socket in mysql". Interested friends may wish to have a look at it. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn the role of socket in mysql.

The default socket location for mysql is / var/lib/mysql.sock

However, the default location is not generally used in production, and the location will be specified by itself.

For example, / data/mysql/mysql.sock

You need to set it in [mysqld] in / etc/my.cnf.

[mysql]

Socket = / data/mysql/data/mysql.sock

When you connect to mysql, you will find that you still need to find / var/lib/mysql.sock. You need to manually specify the location of the socket to connect.

So you also need to set parameters.

[mysql]

Socket = / data/mysql/data/mysql.sock

Use the mysqladmin command when shutting down the database, and go to the default socket

So you also need to specify

[mysqladmin]

Socket = / data/mysql/data/mysql.sock

To sum up: several places in / etc/my.cnf where the socket parameter needs to be set are

[mysql]

Socket = / data/mysql/data/mysql.sock

[mysqld]

Socket = / data/mysql/data/mysql.sock

[mysqladmin]

Socket = / data/mysql/data/mysql.sock

At this point, I believe you have a deeper understanding of "the role of socket in mysql". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!

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.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report