Windows下mysql服务启动后立即关闭

  • A+
所属分类:MySQL
高性能企业级服务器首台5折

问题现象

Windows系统, 启动mysql发现mysql立即关闭。

问题原因

查看mysql日志发现存在下面的信息:


1
2
3
4
5
6
7
8
9
<span class="hljs-number">151030</span> <span class="hljs-number">12</span>:<span class="hljs-number">16</span>:<span class="hljs-number">15</span> [<span class="hljs-literal">Note</span>] Plugin <span class="hljs-symbol">'FEDERATED</span>' <span class="hljs-keyword">is</span> disabled.
<span class="hljs-number">151030</span> <span class="hljs-number">12</span>:<span class="hljs-number">16</span>:<span class="hljs-number">15</span>  InnoDB: Initializing <span class="hljs-keyword">buffer</span> pool, size = <span class="hljs-number">8.0</span>M
<span class="hljs-number">151030</span> <span class="hljs-number">12</span>:<span class="hljs-number">16</span>:<span class="hljs-number">15</span>  InnoDB: Completed initialization <span class="hljs-keyword">of</span> <span class="hljs-keyword">buffer</span> pool
<span class="hljs-number">151030</span> <span class="hljs-number">12</span>:<span class="hljs-number">16</span>:<span class="hljs-number">15</span>  InnoDB: Started; log <span class="hljs-keyword">sequence</span> number <span class="hljs-number">0</span> <span class="hljs-number">58944</span>
<span class="hljs-number">151030</span> <span class="hljs-number">12</span>:<span class="hljs-number">16</span>:<span class="hljs-number">16</span> [<span class="hljs-literal">Note</span>] Event Scheduler: Loaded <span class="hljs-number">0</span> events
<span class="hljs-number">151030</span> <span class="hljs-number">12</span>:<span class="hljs-number">16</span>:<span class="hljs-number">16</span> [<span class="hljs-literal">Note</span>] MySQL: ready <span class="hljs-keyword">for</span> connections.
Version: '<span class="hljs-number">5.1</span>.<span class="hljs-number">71</span>-community'  socket: ''  <span class="hljs-keyword">port</span>: <span class="hljs-number">0</span>  MySQL Community Server (GPL)
<span class="hljs-number">151030</span> <span class="hljs-number">12</span>:<span class="hljs-number">16</span>:<span class="hljs-number">16</span> [<span class="hljs-literal">ERROR</span>] TCP/IP, <span class="hljs-comment">--shared-memory, or --named-pipe should be configured on NT OS</span>
<span class="hljs-number">151030</span> <span class="hljs-number">12</span>:<span class="hljs-number">16</span>:<span class="hljs-number">16</span> [<span class="hljs-literal">ERROR</span>] Aborting

错误主要在以下这条日志。


1
TCP/IP, --<span class="hljs-keyword">shared</span>-memory, <span class="hljs-keyword">or</span> --named-pipe should be configured <span class="hljs-keyword">on</span> NT OS

 

解决方案

查看my.ini配置文件,发现最后在最my.ini后面多了一个 skip-networking

注释掉 #skip-networking 后重启启动恢复正常。

发表评论

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: