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 了,请问如何解决?
● 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
1
JHerschel 2018-06-14 00:20:57 +08:00
没看到 " mysqld_safe A mysqld process already exists "吗?
|
2
yummybitcoin 2018-06-14 03:44:02 +08:00
@JHerschel 请问我应该如何做呢?
|
3
tan90 2018-06-14 07:05:17 +08:00
kill 掉正在运行的 mysqld 进程再试下启动!
|
4
JHerschel 2018-06-14 08:16:46 +08:00
看三楼哒。
|
5
GTim 2018-06-14 08:41:23 +08:00
三楼正确,实操如下
ps aux | grep mysql 看看哪些进程在,然后 kill [进程编号] |