MYSQL服务无法启动,服务没有任何错误;解决方法

mysql服务无法启动,MYSQL服务无法启动,服务没有任何错误;解决方法

本来以前装过MySQL,但是密码忘了,在网上百度重置root密码方法,感觉很麻烦,就想着作死卸载重新装,然后就碰到了这个问题

然后一直卡在这个问题1,2个小时,在网上也百度了很多方法

结果还是一脸懵,真的是大部分方法都试过了,例如:自建的data文件夹;修改my.ini和my-default.ini配置文件等

发现还是没有用,后来还是在这里突然想起干嘛不看自己的日志,不就知道原因了吗

http://blog.51cto.com/enetq/1716159

当时抱着试一试的心态

进入DOS界面,到MySQL文件夹下输入mysqld --console

 

C:\Windows\system32>cd C:\Program Files\MySQL\MySQL Server 5.7\bin

C:\Program Files\MySQL\MySQL Server 5.7\bin>mysqld --console
2018-09-11T11:27:22.996594Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is
 deprecated. Please use --explicit_defaults_for_timestamp server option (see doc
umentation for more details).
2018-09-11T11:27:22.996594Z 0 [Note] --secure-file-priv is set to NULL. Operatio
ns related to importing and exporting data are disabled
2018-09-11T11:27:22.996594Z 0 [Note] mysqld (mysqld 5.7.17) starting as process
6940 ...
2018-09-11T11:27:23.001594Z 0 [Note] InnoDB: Mutexes and rw_locks use Windows in
terlocked functions
2018-09-11T11:27:23.002594Z 0 [Note] InnoDB: Uses event mutexes
2018-09-11T11:27:23.002594Z 0 [Note] InnoDB: _mm_lfence() and _mm_sfence() are u
sed for memory barrier
2018-09-11T11:27:23.002594Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.3
2018-09-11T11:27:23.002594Z 0 [Note] InnoDB: Number of pools: 1
2018-09-11T11:27:23.003594Z 0 [Note] InnoDB: Not using CPU crc32 instructions
2018-09-11T11:27:23.005594Z 0 [Note] InnoDB: Initializing buffer pool, total siz
e = 128M, instances = 1, chunk size = 128M
2018-09-11T11:27:23.013595Z 0 [Note] InnoDB: Completed initialization of buffer
pool
2018-09-11T11:27:23.039596Z 0 [Note] InnoDB: Highest supported file format is Ba
rracuda.
2018-09-11T11:27:23.079598Z 0 [Note] InnoDB: Creating shared tablespace for temp
orary tables
2018-09-11T11:27:23.080598Z 0 [Note] InnoDB: Setting file '.\ibtmp1' size to 12
MB. Physically writing the file full; Please wait ...
2018-09-11T11:27:23.124601Z 0 [Note] InnoDB: File '.\ibtmp1' size is now 12 MB.
2018-09-11T11:27:23.126601Z 0 [Note] InnoDB: 96 redo rollback segment(s) found.
96 redo rollback segment(s) are active.
2018-09-11T11:27:23.126601Z 0 [Note] InnoDB: 32 non-redo rollback segment(s) are
 active.
2018-09-11T11:27:23.128601Z 0 [Note] InnoDB: Waiting for purge to start
2018-09-11T11:27:23.178604Z 0 [Note] InnoDB: 5.7.17 started; log sequence number
 2534665
2018-09-11T11:27:23.179604Z 0 [Note] InnoDB: Loading buffer pool(s) from C:\Prog
ram Files\MySQL\MySQL Server 5.7\data\ib_buffer_pool
2018-09-11T11:27:23.179604Z 0 [Note] Plugin 'FEDERATED' is disabled.
2018-09-11T11:27:23.189605Z 0 [Warning] Failed to set up SSL because of the foll
owing SSL library error: SSL context is not usable without certificate and priva
te key
2018-09-11T11:27:23.190605Z 0 [Note] Server hostname (bind-address): '*'; port:
3306
2018-09-11T11:27:23.191605Z 0 [Note] IPv6 is available.
2018-09-11T11:27:23.192605Z 0 [Note]   - '::' resolves to '::';
2018-09-11T11:27:23.192605Z 0 [Note] Server socket created on IP: '::'.
2018-09-11T11:27:23.193605Z 0 [ERROR] Can't start server: Bind on TCP/IP port: N
o such file or directory
2018-09-11T11:27:23.193605Z 0 [ERROR] Do you already have another mysqld server
running on port: 3306 ?
2018-09-11T11:27:23.194605Z 0 [ERROR] Aborting

2018-09-11T11:27:23.194605Z 0 [Note] Binlog end
2018-09-11T11:27:23.195605Z 0 [Note] Shutting down plugin 'ngram'
2018-09-11T11:27:23.195605Z 0 [Note] Shutting down plugin 'partition'
2018-09-11T11:27:23.195605Z 0 [Note] Shutting down plugin 'BLACKHOLE'
2018-09-11T11:27:23.196605Z 0 [Note] Shutting down plugin 'ARCHIVE'
2018-09-11T11:27:23.196605Z 0 [Note] Shutting down plugin 'PERFORMANCE_SCHEMA'
2018-09-11T11:27:23.197605Z 0 [Note] Shutting down plugin 'MRG_MYISAM'
2018-09-11T11:27:23.198605Z 0 [Note] Shutting down plugin 'MyISAM'
2018-09-11T11:27:23.198605Z 0 [Note] Shutting down plugin 'INNODB_SYS_VIRTUAL'
2018-09-11T11:27:23.198605Z 0 [Note] InnoDB: Buffer pool(s) load completed at 18
0911 19:27:23
2018-09-11T11:27:23.198605Z 0 [Note] Shutting down plugin 'INNODB_SYS_DATAFILES'

2018-09-11T11:27:23.199605Z 0 [Note] Shutting down plugin 'INNODB_SYS_TABLESPACE
S'
2018-09-11T11:27:23.200605Z 0 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN_CO
LS'
2018-09-11T11:27:23.200605Z 0 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN'
2018-09-11T11:27:23.201605Z 0 [Note] Shutting down plugin 'INNODB_SYS_FIELDS'
2018-09-11T11:27:23.201605Z 0 [Note] Shutting down plugin 'INNODB_SYS_COLUMNS'
2018-09-11T11:27:23.202605Z 0 [Note] Shutting down plugin 'INNODB_SYS_INDEXES'
2018-09-11T11:27:23.202605Z 0 [Note] Shutting down plugin 'INNODB_SYS_TABLESTATS
'
2018-09-11T11:27:23.203605Z 0 [Note] Shutting down plugin 'INNODB_SYS_TABLES'
2018-09-11T11:27:23.203605Z 0 [Note] Shutting down plugin 'INNODB_FT_INDEX_TABLE
'
2018-09-11T11:27:23.204605Z 0 [Note] Shutting down plugin 'INNODB_FT_INDEX_CACHE
'
2018-09-11T11:27:23.204605Z 0 [Note] Shutting down plugin 'INNODB_FT_CONFIG'
2018-09-11T11:27:23.204605Z 0 [Note] Shutting down plugin 'INNODB_FT_BEING_DELET
ED'
2018-09-11T11:27:23.205606Z 0 [Note] Shutting down plugin 'INNODB_FT_DELETED'
2018-09-11T11:27:23.205606Z 0 [Note] Shutting down plugin 'INNODB_FT_DEFAULT_STO
PWORD'
2018-09-11T11:27:23.206606Z 0 [Note] Shutting down plugin 'INNODB_METRICS'
2018-09-11T11:27:23.207606Z 0 [Note] Shutting down plugin 'INNODB_TEMP_TABLE_INF
O'
2018-09-11T11:27:23.207606Z 0 [Note] Shutting down plugin 'INNODB_BUFFER_POOL_ST
ATS'
2018-09-11T11:27:23.208606Z 0 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE_LR
U'
2018-09-11T11:27:23.208606Z 0 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE'
2018-09-11T11:27:23.208606Z 0 [Note] Shutting down plugin 'INNODB_CMP_PER_INDEX_
RESET'
2018-09-11T11:27:23.209606Z 0 [Note] Shutting down plugin 'INNODB_CMP_PER_INDEX'

2018-09-11T11:27:23.209606Z 0 [Note] Shutting down plugin 'INNODB_CMPMEM_RESET'
2018-09-11T11:27:23.209606Z 0 [Note] Shutting down plugin 'INNODB_CMPMEM'
2018-09-11T11:27:23.210606Z 0 [Note] Shutting down plugin 'INNODB_CMP_RESET'
2018-09-11T11:27:23.210606Z 0 [Note] Shutting down plugin 'INNODB_CMP'
2018-09-11T11:27:23.210606Z 0 [Note] Shutting down plugin 'INNODB_LOCK_WAITS'
2018-09-11T11:27:23.211606Z 0 [Note] Shutting down plugin 'INNODB_LOCKS'
2018-09-11T11:27:23.211606Z 0 [Note] Shutting down plugin 'INNODB_TRX'
2018-09-11T11:27:23.212606Z 0 [Note] Shutting down plugin 'InnoDB'
2018-09-11T11:27:23.212606Z 0 [Note] InnoDB: FTS optimize thread exiting.
2018-09-11T11:27:23.213606Z 0 [Note] InnoDB: Starting shutdown...
2018-09-11T11:27:23.313612Z 0 [Note] InnoDB: Dumping buffer pool(s) to C:\Progra
m Files\MySQL\MySQL Server 5.7\data\ib_buffer_pool
2018-09-11T11:27:23.314612Z 0 [Note] InnoDB: Buffer pool(s) dump completed at 18
0911 19:27:23
2018-09-11T11:27:24.619686Z 0 [Note] InnoDB: Shutdown completed; log sequence nu
mber 2534684
2018-09-11T11:27:24.620686Z 0 [Note] InnoDB: Removed temporary tablespace data f
ile: "ibtmp1"
2018-09-11T11:27:24.621687Z 0 [Note] Shutting down plugin 'MEMORY'
2018-09-11T11:27:24.621687Z 0 [Note] Shutting down plugin 'CSV'
2018-09-11T11:27:24.623687Z 0 [Note] Shutting down plugin 'sha256_password'
2018-09-11T11:27:24.623687Z 0 [Note] Shutting down plugin 'mysql_native_password
'
2018-09-11T11:27:24.624687Z 0 [Note] Shutting down plugin 'binlog'
2018-09-11T11:27:24.625687Z 0 [Note] mysqld: Shutdown complete

看到错误,一下想起了自己做的死,简直泪流满面啊,

IP被另一个服务占用了,然后高兴坏了,小手一点,然后困扰了我一个多小时问题就解决了。

最后总结一下该问题的解决方法(包括我自己在网上查的,虽然我的不是这个原因):

方法1:data文件夹是自己创建的,删除data文件夹,在DOS界面进入到MySQL的文件夹下输入这个命令:mysqld  --initialize ,重新初始化一个data文件。(大部分好像都是这个原因)

方法2:配置my.ini。下面这个好像有说到配置my.ini

https://blog.csdn.net/liyangyang0528/article/details/54233632#commentBox

方法3:就是看你的IP有没有被占用(也就是我遇到的问题)

方法4:自己在DOS界面在MySQL文件夹的bin目录中输入mysqld --console命令,查询错误日志,毕竟每个人遇到的错误原因都不一定相同,可以通过自己的日志找到自己真正错误的原因(推荐方法)

C:\Windows\system32>cd C:\Program Files\MySQL\MySQL Server 5.7\bin

C:\Program Files\MySQL\MySQL Server 5.7\bin>mysqld --console

MYSQL服务无法启动,服务没有任何错误;解决方法的相关内容如下:

mysql服务无法启动的原因| 启动mysql服务名无效| bios设置u盘启动| mysql无法启动错误1067| 如何将mysql加到服务里| macos启动盘| mysql服务器名无效| mysql重启服务报错|

TAG标签:

文章标题:MYSQL服务无法启动,服务没有任何错误;解决方法

转载注明出处:http://www.puyangxw.cn/newszx/473031.html

说点什么吧
  • 全部评论(0
    还没有评论,快来抢沙发吧!

随机标签推荐

濮阳新闻