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