首页   注册   登录
V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
华为云
V2EX  ›  程序员

mysql 启动失败

  •  
  •   kmdd33 · 130 天前 · 550 次点击
    这是一个创建于 130 天前的主题,其中的信息可能已经有所发展或是发生改变。

    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

    6 回复  |  直到 2018-06-14 18:04:07 +08:00
        1
    JHerschel   130 天前
    没看到 " mysqld_safe A mysqld process already exists "吗?
        2
    yummybitcoin   130 天前
    @JHerschel 请问我应该如何做呢?
        3
    tan90   130 天前
    kill 掉正在运行的 mysqld 进程再试下启动!
        4
    JHerschel   130 天前
    看三楼哒。
        5
    GTim   130 天前
    三楼正确,实操如下


    ps aux | grep mysql

    看看哪些进程在,然后

    kill [进程编号]
        6
    kmdd33   129 天前
    @GTim @tan90 @JHerschel 谢谢,已经解决
    关于   ·   FAQ   ·   API   ·   我们的愿景   ·   广告投放   ·   感谢   ·   实用小工具   ·   3316 人在线   最高记录 3762   ·  
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.1 · 20ms · UTC 03:52 · PVG 11:52 · LAX 20:52 · JFK 23:52
    ♥ Do have faith in what you're doing.
    沪ICP备16043287号-1