zoukankan      html  css  js  c++  java
  • 本地计算机上的MySQL服务启动后停止。某些服务在未由其他服务或程序使用时将自动停止。

    问题:

      MySQL启动报错

      

    排查:

      cmd中输入

    mysqld --console

       显示

     1 C:Usersasil>mysqld --console
     2 2019-01-30T01:40:44.158771Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
     3 2019-01-30T01:40:44.158771Z 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.
     4 2019-01-30T01:40:44.158771Z 0 [Warning] 'NO_AUTO_CREATE_USER' sql mode was not set.
     5 2019-01-30T01:40:44.158771Z 0 [Note] --secure-file-priv is set to NULL. Operations related to importing and exporting data are disabled
     6 2019-01-30T01:40:44.159766Z 0 [Note] mysqld (mysqld 5.7.20) starting as process 2104 ...
     7 2019-01-30T01:40:44.173510Z 0 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions
     8 2019-01-30T01:40:44.174506Z 0 [Note] InnoDB: Uses event mutexes
     9 2019-01-30T01:40:44.174506Z 0 [Note] InnoDB: _mm_lfence() and _mm_sfence() are used for memory barrier
    10 2019-01-30T01:40:44.175503Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.3
    11 2019-01-30T01:40:44.175503Z 0 [Note] InnoDB: Number of pools: 1
    12 2019-01-30T01:40:44.176500Z 0 [Note] InnoDB: Not using CPU crc32 instructions
    13 2019-01-30T01:40:44.193456Z 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
    14 2019-01-30T01:40:44.199441Z 0 [Note] InnoDB: Completed initialization of buffer pool
    15 2019-01-30T01:40:44.241257Z 0 [Note] InnoDB: Highest supported file format is Barracuda.
    16 2019-01-30T01:40:44.340299Z 0 [Note] InnoDB: Creating shared tablespace for temporary tables
    17 2019-01-30T01:40:44.343290Z 0 [Note] InnoDB: Setting file '.ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
    18 2019-01-30T01:40:44.366473Z 0 [Note] InnoDB: File '.ibtmp1' size is now 12 MB.
    19 2019-01-30T01:40:44.433390Z 0 [Note] InnoDB: 96 redo rollback segment(s) found. 96 redo rollback segment(s) are active.
    20 2019-01-30T01:40:44.434387Z 0 [Note] InnoDB: 32 non-redo rollback segment(s) are active.
    21 2019-01-30T01:40:44.436381Z 0 [Note] InnoDB: Waiting for purge to start
    22 2019-01-30T01:40:44.487667Z 0 [Note] InnoDB: 5.7.20 started; log sequence number 2682761
    23 2019-01-30T01:40:44.488553Z 0 [Note] Plugin 'FEDERATED' is disabled.
    24 2019-01-30T01:40:44.489552Z 0 [Note] InnoDB: Loading buffer pool(s) from D:DevelopSotfwaremysql-5.7.20-winx64dataib_buffer_pool
    25 2019-01-30T01:40:44.498544Z 0 [ERROR] unknown variable 'long-slow-queries=D:DevelopSotfwaremysql-5.7.20-winx64slow-query.log'
    26 2019-01-30T01:40:44.498544Z 0 [ERROR] Aborting
    27 
    28 2019-01-30T01:40:44.499541Z 0 [Note] Binlog end
    29 2019-01-30T01:40:44.499541Z 0 [Note] Shutting down plugin 'ngram'
    30 2019-01-30T01:40:44.500539Z 0 [Note] Shutting down plugin 'partition'
    31 2019-01-30T01:40:44.500539Z 0 [Note] Shutting down plugin 'BLACKHOLE'
    32 2019-01-30T01:40:44.500539Z 0 [Note] Shutting down plugin 'ARCHIVE'
    33 2019-01-30T01:40:44.501538Z 0 [Note] Shutting down plugin 'PERFORMANCE_SCHEMA'
    34 2019-01-30T01:40:44.501538Z 0 [Note] Shutting down plugin 'MRG_MYISAM'
    35 2019-01-30T01:40:44.502532Z 0 [Note] Shutting down plugin 'MyISAM'
    36 2019-01-30T01:40:44.504527Z 0 [Note] Shutting down plugin 'INNODB_SYS_VIRTUAL'
    37 2019-01-30T01:40:44.504527Z 0 [Note] Shutting down plugin 'INNODB_SYS_DATAFILES'
    38 2019-01-30T01:40:44.504527Z 0 [Note] Shutting down plugin 'INNODB_SYS_TABLESPACES'
    39 2019-01-30T01:40:44.504527Z 0 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN_COLS'
    40 2019-01-30T01:40:44.504527Z 0 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN'
    41 2019-01-30T01:40:44.505524Z 0 [Note] Shutting down plugin 'INNODB_SYS_FIELDS'
    42 2019-01-30T01:40:44.505524Z 0 [Note] Shutting down plugin 'INNODB_SYS_COLUMNS'
    43 2019-01-30T01:40:44.505524Z 0 [Note] Shutting down plugin 'INNODB_SYS_INDEXES'
    44 2019-01-30T01:40:44.505524Z 0 [Note] Shutting down plugin 'INNODB_SYS_TABLESTATS'
    45 2019-01-30T01:40:44.507520Z 0 [Note] Shutting down plugin 'INNODB_SYS_TABLES'
    46 2019-01-30T01:40:44.507520Z 0 [Note] Shutting down plugin 'INNODB_FT_INDEX_TABLE'
    47 2019-01-30T01:40:44.508517Z 0 [Note] Shutting down plugin 'INNODB_FT_INDEX_CACHE'
    48 2019-01-30T01:40:44.508517Z 0 [Note] Shutting down plugin 'INNODB_FT_CONFIG'
    49 2019-01-30T01:40:44.508517Z 0 [Note] Shutting down plugin 'INNODB_FT_BEING_DELETED'
    50 2019-01-30T01:40:44.508517Z 0 [Note] Shutting down plugin 'INNODB_FT_DELETED'
    51 2019-01-30T01:40:44.508517Z 0 [Note] Shutting down plugin 'INNODB_FT_DEFAULT_STOPWORD'
    52 2019-01-30T01:40:44.509514Z 0 [Note] Shutting down plugin 'INNODB_METRICS'
    53 2019-01-30T01:40:44.509514Z 0 [Note] Shutting down plugin 'INNODB_TEMP_TABLE_INFO'
    54 2019-01-30T01:40:44.509514Z 0 [Note] Shutting down plugin 'INNODB_BUFFER_POOL_STATS'
    55 2019-01-30T01:40:44.509514Z 0 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE_LRU'
    56 2019-01-30T01:40:44.509514Z 0 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE'
    57 2019-01-30T01:40:44.510512Z 0 [Note] Shutting down plugin 'INNODB_CMP_PER_INDEX_RESET'
    58 2019-01-30T01:40:44.510512Z 0 [Note] InnoDB: Buffer pool(s) load completed at 190130  9:40:44
    59 2019-01-30T01:40:44.510512Z 0 [Note] Shutting down plugin 'INNODB_CMP_PER_INDEX'
    60 2019-01-30T01:40:44.510512Z 0 [Note] Shutting down plugin 'INNODB_CMPMEM_RESET'
    61 2019-01-30T01:40:44.510512Z 0 [Note] Shutting down plugin 'INNODB_CMPMEM'
    62 2019-01-30T01:40:44.511509Z 0 [Note] Shutting down plugin 'INNODB_CMP_RESET'
    63 2019-01-30T01:40:44.511509Z 0 [Note] Shutting down plugin 'INNODB_CMP'
    64 2019-01-30T01:40:44.511509Z 0 [Note] Shutting down plugin 'INNODB_LOCK_WAITS'
    65 2019-01-30T01:40:44.511509Z 0 [Note] Shutting down plugin 'INNODB_LOCKS'
    66 2019-01-30T01:40:44.511509Z 0 [Note] Shutting down plugin 'INNODB_TRX'
    67 2019-01-30T01:40:44.512509Z 0 [Note] Shutting down plugin 'InnoDB'
    68 2019-01-30T01:40:44.512509Z 0 [Note] InnoDB: FTS optimize thread exiting.
    69 2019-01-30T01:40:44.512509Z 0 [Note] InnoDB: Starting shutdown...
    70 2019-01-30T01:40:44.613877Z 0 [Note] InnoDB: Dumping buffer pool(s) to D:DevelopSotfwaremysql-5.7.20-winx64dataib_buffer_pool
    71 2019-01-30T01:40:44.618864Z 0 [Note] InnoDB: Buffer pool(s) dump completed at 190130  9:40:44
    72 2019-01-30T01:40:45.930503Z 0 [Note] InnoDB: Shutdown completed; log sequence number 2682780
    73 2019-01-30T01:40:45.931501Z 0 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1"
    74 2019-01-30T01:40:45.932497Z 0 [Note] Shutting down plugin 'MEMORY'
    75 2019-01-30T01:40:45.932497Z 0 [Note] Shutting down plugin 'CSV'
    76 2019-01-30T01:40:45.932497Z 0 [Note] Shutting down plugin 'sha256_password'
    77 2019-01-30T01:40:45.933614Z 0 [Note] Shutting down plugin 'mysql_native_password'
    78 2019-01-30T01:40:45.933614Z 0 [Note] Shutting down plugin 'binlog'
    79 2019-01-30T01:40:45.934597Z 0 [Note] mysqld: Shutdown complete
    View Code

    注意报错:[ERROR] unknown variable 'long-slow-queries=D:DevelopSotfwaremysql-5.7.20-winx64slow-query.log',之前学习MySQL优化留下的坑,MySQL重启起不来了。

    解决方案:

      注释或者删除掉,再次重启即可

    参考:

      mysql5.7 本地计算机上的mysql 服务启动后停止 的问题解决

  • 相关阅读:
    决策树算法
    数据挖掘建模-Logistic回归
    Python数据结构与算法-栈和递归函数
    使用python自动化生成软件著作权的源代码
    一起玩转图论算法(1)图的基本表示
    全网最最最详细的软件著作权申请步骤
    时间序列模式(ARIMA)---Python实现
    宝塔面板怎样部署SSL证书?
    Linux基础概念入门
    转载:VMware workstation创建虚拟机,安装Ubuntu系统
  • 原文地址:https://www.cnblogs.com/basilguo/p/mysql_restart.html
Copyright © 2011-2022 走看看