• 登陆mysql时提示异常的解决方法


    [root@host2 ~]# mysql -uroot -p
    Enter password: 
    ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
    [root@host2 ~]#  /etc/init.d/mysql status
     ERROR! MySQL is running but PID file could not be found

    查看MYSQL进程:
    ps aux | grep mysql
    然后KILL进程
    kill -9 pid1 pid2 …

    [root@host2 ~]# ps aux | grep mysql
    root      1813  0.0  0.0 108336    68 ?        S    Jul14   0:00 /bin/sh /usr/bin/mysqld_safe --datadir=/var/lib/mysql --pid-file=/var/lib/mysql/host2.pid
    mysql     1918  0.0 19.5 1076608 197440 ?      Sl   Jul14   0:02 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib64/mysql/plugin --user=mysql --log-error=/var/lib/mysql/host2.err --pid-file=/var/lib/mysql/host2.pid
    root      2982  0.0  0.0 103256   844 pts/3    S+   00:09   0:00 grep mysql
    [root@host2 ~]# kill -9 1813 1918

    再启动MYSQL
    /etc/init.d/mysql start
    检查mysql运行状态
    /etc/init.d/mysql status

    成功!

  • 相关阅读:
    微信小程序
    svn
    当滑动条滑动到某一位置触发js
    css固定页面
    css三级菜单
    h5时钟
    DOM节点
    应用r.js来优化你的前端
    浅谈javascript中的作用域
    javascript 中的 arguments,callee.caller,apply,call 区别
  • 原文地址:https://www.cnblogs.com/zejin2008/p/4648393.html
Copyright © 2020-2023  润新知