mysql 启动失败

2018-06-13 23:56:11 +08:00
 kmdd33

yum 安装好 mysql 后出现无法新建数据库,只要进入数据,按照下面的教程: https://linode.com/docs/databases/mysql/how-to-install-mysql-on-centos-7/ 新建数据库 会出现:Access denied for user 'xxx'@'%' to database 'xxxx'

于是 google 了几个教程: https://blog.csdn.net/chun8416/article/details/50177117

但是修改后:现在无法启动 mysql 了,请问如何解决?

systemctl status mysqld.service -l

● mysqld.service - MySQL Community Server

Loaded: loaded (/usr/lib/systemd/system/mysqld.service; enabled; vendor preset: disabled)

Active: failed (Result: start-limit) since Wed 2018-06-13 15:47:14 UTC; 23s ago

Process: 4784 ExecStartPost=/usr/bin/mysql-systemd-start post (code=exited, status=0/SUCCESS)

Process: 4783 ExecStart=/usr/bin/mysqld_safe --basedir=/usr (code=exited, status=1/FAILURE)

Process: 4771 ExecStartPre=/usr/bin/mysql-systemd-start pre (code=exited, status=0/SUCCESS)

Main PID: 4783 (code=exited, status=1/FAILURE)

Jun 13 15:47:14 li1382-238.members.linode.com systemd[1]: Failed to start MySQL Community Server.

Jun 13 15:47:14 li1382-238.members.linode.com systemd[1]: Unit mysqld.service entered failed state.

Jun 13 15:47:14 li1382-238.members.linode.com systemd[1]: mysqld.service failed.

Jun 13 15:47:14 li1382-238.members.linode.com systemd[1]: mysqld.service holdoff time over, scheduling restart.

Jun 13 15:47:14 li1382-238.members.linode.com systemd[1]: start request repeated too quickly for mysqld.service

Jun 13 15:47:14 li1382-238.members.linode.com systemd[1]: Failed to start MySQL Community Server.

Jun 13 15:47:14 li1382-238.members.linode.com systemd[1]: Unit mysqld.service entered failed state.

Jun 13 15:47:14 li1382-238.members.linode.com systemd[1]: mysqld.service failed.

/ var/log/mysqld.log 里面的日志

2018-06-13 15:35:05 3884 [Note] InnoDB: Waiting for purge to start

2018-06-13 15:35:05 3884 [Note] InnoDB: 5.6.40 started; log sequence number 1625997

2018-06-13 15:35:05 3884 [Note] Server hostname (bind-address): '*'; port: 3306

2018-06-13 15:35:05 3884 [Note] IPv6 is available.

2018-06-13 15:35:05 3884 [Note] - '::' resolves to '::';

2018-06-13 15:35:05 3884 [Note] Server socket created on IP: '::'.

2018-06-13 15:35:05 3884 [Note] /usr/sbin/mysqld: ready for connections.

Version: '5.6.40' socket: '/var/lib/mysql/mysql.sock' port: 3306 MySQL Community Server (GPL) 180613 15:47:08 mysqld_safe Logging to '/var/log/mysqld.log'.

180613 15:47:08 mysqld_safe A mysqld process already exists

180613 15:47:09 mysqld_safe Logging to '/var/log/mysqld.log'.

180613 15:47:10 mysqld_safe A mysqld process already exists

180613 15:47:11 mysqld_safe Logging to '/var/log/mysqld.log'.

180613 15:47:11 mysqld_safe A mysqld process already exists

180613 15:47:12 mysqld_safe Logging to '/var/log/mysqld.log'.

180613 15:47:12 mysqld_safe A mysqld process already exists

180613 15:47:13 mysqld_safe Logging to '/var/log/mysqld.log'.

180613 15:47:13 mysqld_safe A mysqld process already exists

4208 次点击
所在节点    程序员
6 条回复
JHerschel
2018-06-14 00:20:57 +08:00
没看到 " mysqld_safe A mysqld process already exists "吗?
yummybitcoin
2018-06-14 03:44:02 +08:00
@JHerschel 请问我应该如何做呢?
tan90
2018-06-14 07:05:17 +08:00
kill 掉正在运行的 mysqld 进程再试下启动!
JHerschel
2018-06-14 08:16:46 +08:00
看三楼哒。
GTim
2018-06-14 08:41:23 +08:00
三楼正确,实操如下


ps aux | grep mysql

看看哪些进程在,然后

kill [进程编号]
kmdd33
2018-06-14 18:04:07 +08:00
@GTim @tan90 @JHerschel 谢谢,已经解决

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/462932

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX