1. See MySQL is the client server mode.
2. How do we manipulate the database?
A. Direct SQL, various programming languages,
3. How does the client and server communicate?
All C/S mode will own the protocol, but are based on the TCP/IP protocol, there is Socekt communication under Linux, the port number is 3306
4. A simple SQL process is as follows;
1 User Login using Mysql-u-root
2. The server receives the request, the Connection Management module (manages a large number of threads), assigns a thread to the user,
3. Thread Call User Management module Verify user's account password Yes No, then release,
4. The user starts typing sleletc (query) update Delete (data manipulation language), show status (the state of the database), and SQL commands such as the CREATE table (data definition Language).
5. The command dispatcher assigns the above input SQL to each module according to the type, and the SELETC is the most complex, which corresponds to the query optimizer. At the same time in the query process if there is a query cache, you do not have access to the database, directly from the cache, in the process there will be log records, what are the logs?
6. To access the contents of the file, you also have permissions, each user has their own permissions, so have permission to check the module, and then through the storage engine processing.
Ref
http://blog.csdn.net/hguisu/article/details/7106342