MySQL socket file, PID file, table structure file

Source: Internet
Author: User
Tags unix domain socket

Socket file: The file you need when you connect using a UNIX domain socket.

PID file: The process ID file for the MySQL instance.

MySQL table structure file: Used to store MySQL table structure definition file.

Socket file

Local connection to UNIX system MySQL can use UNIX domain sockets, which requires a socket (socket) file. A socket file can be controlled by a parameter socket. Typically in the/tmp directory, the name is Mysql.sock:

Show variables like ' socket ' \g

PID File

When the MySQL instance starts, it writes its own process ID to a file-the file is the PID file. The file can be controlled by the parameter pid_file. The default path is in the database directory, and the file name is the hostname. PID.

Show variables like ' Pid_file ' \g

MySQL table structure file

Because of the architecture of the MySQL plug-in storage engine, MySQL stores the data according to the table, so each table has its corresponding file (the SQL Server is in the MDF file according to all the tables or indexes under each database). Regardless of the storage engine, MySQL has a file with the name of the frm suffix, which records the table structure definition for the table . binary files.

The frm is also used to store the definition of the view , as we create a v_a view, then a v_a.frm file is generated to record the definition of the view, which is a text file that can be viewed directly using the cat command:

Show variables like ' DataDir ';

Exit

Cd/usr/local/var/mysql/test

Cat V_a.frm

TYPE=VIEWQuery=Select'Test'.'a'.'b' as'b' from'Test'.'a'MD5=4eda70387716a4d6c96f3042dd68b742updatable=1algorithm=0Definer_user=Rootdefiner_host=Localhostsuid=2with_check_option=0timestamp= .- ,-Geneva  -: at: $Create-Version=1Source=Select* fromAclient_cs_name=Utf8connection_cl_name=Utf8_general_ciview_body_utf8=Select'Test'.'a'.'b' as'b' from'Test'.'a'

MySQL socket file, PID file, table structure file

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.