1. [root@liabio ~]# kubectl logs -f mysql-79bd6fcfd-28r8b
    2. 2020-10-10 01:17:36+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 5.7.28-1debian9 started.
    3. 2020-10-10 01:17:36+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
    4. 2020-10-10 01:17:36+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 5.7.28-1debian9 started.
    5. 2020-10-10T01:17:36.972533Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
    6. 2020-10-10T01:17:36.972607Z 0 [Warning] 'NO_ZERO_DATE', 'NO_ZERO_IN_DATE' and 'ERROR_FOR_DIVISION_BY_ZERO' sql modes should be used with strict mode. They will be merged with strict mode in a future release.
    7. 2020-10-10T01:17:36.972611Z 0 [Warning] 'NO_AUTO_CREATE_USER' sql mode was not set.
    8. 2020-10-10T01:17:36.974254Z 0 [Note] mysqld (mysqld 5.7.28) starting as process 1 ...
    9. 2020-10-10T01:17:36.976987Z 0 [Note] InnoDB: PUNCH HOLE support available
    10. 2020-10-10T01:17:36.977007Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
    11. 2020-10-10T01:17:36.977011Z 0 [Note] InnoDB: Uses event mutexes
    12. 2020-10-10T01:17:36.977013Z 0 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
    13. 2020-10-10T01:17:36.977016Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
    14. 2020-10-10T01:17:36.977018Z 0 [Note] InnoDB: Using Linux native AIO
    15. 2020-10-10T01:17:36.977263Z 0 [Note] InnoDB: Number of pools: 1
    16. 2020-10-10T01:17:36.977371Z 0 [Note] InnoDB: Using CPU crc32 instructions
    17. 2020-10-10T01:17:36.979240Z 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
    18. 2020-10-10T01:17:36.986710Z 0 [Note] InnoDB: Completed initialization of buffer pool
    19. 2020-10-10T01:17:36.988913Z 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
    20. 2020-10-10T01:17:37.000775Z 0 [Note] InnoDB: Highest supported file format is Barracuda.
    21. 2020-10-10T01:17:37.013471Z 0 [Note] InnoDB: Creating shared tablespace for temporary tables
    22. 2020-10-10T01:17:37.013536Z 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
    23. 2020-10-10T01:17:37.099331Z 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
    24. 2020-10-10T01:17:37.100263Z 0 [Note] InnoDB: 96 redo rollback segment(s) found. 96 redo rollback segment(s) are active.
    25. 2020-10-10T01:17:37.100291Z 0 [Note] InnoDB: 32 non-redo rollback segment(s) are active.
    26. 2020-10-10T01:17:37.100715Z 0 [Note] InnoDB: Waiting for purge to start
    27. 2020-10-10T01:17:37.150994Z 0 [Note] InnoDB: 5.7.28 started; log sequence number 26364237
    28. 2020-10-10T01:17:37.151473Z 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
    29. 2020-10-10T01:17:37.151541Z 0 [Note] Plugin 'FEDERATED' is disabled.
    30. 2020-10-10T01:17:37.152177Z 0 [Note] InnoDB: Buffer pool(s) load completed at 201010 1:17:37
    31. 2020-10-10T01:17:37.159254Z 0 [Note] Found ca.pem, server-cert.pem and server-key.pem in data directory. Trying to enable SSL support using them.
    32. 2020-10-10T01:17:37.159279Z 0 [Note] Skipping generation of SSL certificates as certificate files are present in data directory.
    33. 2020-10-10T01:17:37.159864Z 0 [Warning] CA certificate ca.pem is self signed.
    34. 2020-10-10T01:17:37.159906Z 0 [Note] Skipping generation of RSA key pair as key files are present in data directory.
    35. 2020-10-10T01:17:37.160296Z 0 [Note] Server hostname (bind-address): '*'; port: 3306
    36. 2020-10-10T01:17:37.160345Z 0 [Note] IPv6 is available.
    37. 2020-10-10T01:17:37.160358Z 0 [Note] - '::' resolves to '::';
    38. 2020-10-10T01:17:37.160387Z 0 [Note] Server socket created on IP: '::'.
    39. 2020-10-10T01:17:37.160431Z 0 [ERROR] Could not create unix socket lock file /var/lib/mysqld/mysqld.sock.lock.
    40. 2020-10-10T01:17:37.160439Z 0 [ERROR] Unable to setup unix socket lock file.
    41. 2020-10-10T01:17:37.160441Z 0 [ERROR] Aborting
    42. 2020-10-10T01:17:37.160452Z 0 [Note] Binlog end
    43. 2020-10-10T01:17:37.160520Z 0 [Note] Shutting down plugin 'ngram'
    44. 2020-10-10T01:17:37.160529Z 0 [Note] Shutting down plugin 'partition'
    45. 2020-10-10T01:17:37.160531Z 0 [Note] Shutting down plugin 'BLACKHOLE'
    46. 2020-10-10T01:17:37.160534Z 0 [Note] Shutting down plugin 'ARCHIVE'
    47. 2020-10-10T01:17:37.160536Z 0 [Note] Shutting down plugin 'PERFORMANCE_SCHEMA'
    48. 2020-10-10T01:17:37.160585Z 0 [Note] Shutting down plugin 'MRG_MYISAM'
    49. 2020-10-10T01:17:37.160592Z 0 [Note] Shutting down plugin 'MyISAM'
    50. 2020-10-10T01:17:37.160619Z 0 [Note] Shutting down plugin 'INNODB_SYS_VIRTUAL'
    51. 2020-10-10T01:17:37.160623Z 0 [Note] Shutting down plugin 'INNODB_SYS_DATAFILES'
    52. 2020-10-10T01:17:37.160627Z 0 [Note] Shutting down plugin 'INNODB_SYS_TABLESPACES'
    53. 2020-10-10T01:17:37.160630Z 0 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN_COLS'
    54. 2020-10-10T01:17:37.160632Z 0 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN'
    55. 2020-10-10T01:17:37.160634Z 0 [Note] Shutting down plugin 'INNODB_SYS_FIELDS'
    56. 2020-10-10T01:17:37.160637Z 0 [Note] Shutting down plugin 'INNODB_SYS_COLUMNS'
    57. 2020-10-10T01:17:37.160640Z 0 [Note] Shutting down plugin 'INNODB_SYS_INDEXES'
    58. 2020-10-10T01:17:37.160642Z 0 [Note] Shutting down plugin 'INNODB_SYS_TABLESTATS'
    59. 2020-10-10T01:17:37.160645Z 0 [Note] Shutting down plugin 'INNODB_SYS_TABLES'
    60. 2020-10-10T01:17:37.160648Z 0 [Note] Shutting down plugin 'INNODB_FT_INDEX_TABLE'
    61. 2020-10-10T01:17:37.160649Z 0 [Note] Shutting down plugin 'INNODB_FT_INDEX_CACHE'
    62. 2020-10-10T01:17:37.160651Z 0 [Note] Shutting down plugin 'INNODB_FT_CONFIG'
    63. 2020-10-10T01:17:37.160653Z 0 [Note] Shutting down plugin 'INNODB_FT_BEING_DELETED'
    64. 2020-10-10T01:17:37.160656Z 0 [Note] Shutting down plugin 'INNODB_FT_DELETED'
    65. 2020-10-10T01:17:37.160657Z 0 [Note] Shutting down plugin 'INNODB_FT_DEFAULT_STOPWORD'
    66. 2020-10-10T01:17:37.160659Z 0 [Note] Shutting down plugin 'INNODB_METRICS'
    67. 2020-10-10T01:17:37.160661Z 0 [Note] Shutting down plugin 'INNODB_TEMP_TABLE_INFO'
    68. 2020-10-10T01:17:37.160663Z 0 [Note] Shutting down plugin 'INNODB_BUFFER_POOL_STATS'
    69. 2020-10-10T01:17:37.160665Z 0 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE_LRU'
    70. 2020-10-10T01:17:37.160667Z 0 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE'
    71. 2020-10-10T01:17:37.160669Z 0 [Note] Shutting down plugin 'INNODB_CMP_PER_INDEX_RESET'
    72. 2020-10-10T01:17:37.160672Z 0 [Note] Shutting down plugin 'INNODB_CMP_PER_INDEX'
    73. 2020-10-10T01:17:37.160675Z 0 [Note] Shutting down plugin 'INNODB_CMPMEM_RESET'
    74. 2020-10-10T01:17:37.160678Z 0 [Note] Shutting down plugin 'INNODB_CMPMEM'
    75. 2020-10-10T01:17:37.160681Z 0 [Note] Shutting down plugin 'INNODB_CMP_RESET'
    76. 2020-10-10T01:17:37.160684Z 0 [Note] Shutting down plugin 'INNODB_CMP'
    77. 2020-10-10T01:17:37.160687Z 0 [Note] Shutting down plugin 'INNODB_LOCK_WAITS'
    78. 2020-10-10T01:17:37.160688Z 0 [Note] Shutting down plugin 'INNODB_LOCKS'
    79. 2020-10-10T01:17:37.160690Z 0 [Note] Shutting down plugin 'INNODB_TRX'
    80. 2020-10-10T01:17:37.160692Z 0 [Note] Shutting down plugin 'InnoDB'
    81. 2020-10-10T01:17:37.160756Z 0 [Note] InnoDB: FTS optimize thread exiting.
    82. 2020-10-10T01:17:37.160937Z 0 [Note] InnoDB: Starting shutdown...
    83. 2020-10-10T01:17:37.261160Z 0 [Note] InnoDB: Dumping buffer pool(s) to /var/lib/mysql/ib_buffer_pool
    84. 2020-10-10T01:17:37.261415Z 0 [Note] InnoDB: Buffer pool(s) dump completed at 201010 1:17:37
    85. 2020-10-10T01:17:38.780695Z 0 [Note] InnoDB: Shutdown completed; log sequence number 26364256
    86. 2020-10-10T01:17:38.782420Z 0 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1"
    87. 2020-10-10T01:17:38.782452Z 0 [Note] Shutting down plugin 'MEMORY'
    88. 2020-10-10T01:17:38.782459Z 0 [Note] Shutting down plugin 'CSV'
    89. 2020-10-10T01:17:38.782464Z 0 [Note] Shutting down plugin 'sha256_password'
    90. 2020-10-10T01:17:38.782467Z 0 [Note] Shutting down plugin 'mysql_native_password'
    91. 2020-10-10T01:17:38.782664Z 0 [Note] Shutting down plugin 'binlog'
    92. 2020-10-10T01:17:38.783055Z 0 [Note] mysqld: Shutdown complete

    报错:

    1. 2020-10-10T01:17:37.160296Z 0 [Note] Server hostname (bind-address): '*'; port: 3306
    2. 2020-10-10T01:17:37.160345Z 0 [Note] IPv6 is available.
    3. 2020-10-10T01:17:37.160358Z 0 [Note] - '::' resolves to '::';
    4. 2020-10-10T01:17:37.160387Z 0 [Note] Server socket created on IP: '::'.
    5. 2020-10-10T01:17:37.160431Z 0 [ERROR] Could not create unix socket lock file /var/lib/mysqld/mysqld.sock.lock.
    6. 2020-10-10T01:17:37.160439Z 0 [ERROR] Unable to setup unix socket lock file.
    7. 2020-10-10T01:17:37.160441Z 0 [ERROR] Aborting
    8. 2020-10-10T01:17:37.160452Z 0 [Note] Binlog end