美文网首页
Mysql碰到的一些问题

Mysql碰到的一些问题

作者: 城南一霸賈十七 | 来源:发表于2018-09-21 09:32 被阅读10次

    Multiple MySQL running but PID file could not be found (202[失败])

    [root@localhost ~]# service mysql start
    Starting MySQL                                             [确定]
    [root@localhost ~]# service mysql status
    Multiple MySQL running but PID file could not be found (202[失败])
    [root@localhost ~]# ps aux | grep mysql
    root      1397  0.0  0.0 108328  1496 ?        S    15:43   0:00 /bin/sh /usr/bin/mysqld_safe --datadir=/var/lib/mysql --pid-file=/var/lib/mysql/localhost.localdomain.pid
    mysql     1586  0.5 23.8 1078024 458736 ?      Sl   15:43   0:01 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib64/mysql/plugin --user=mysql --log-error=/var/log/mysqld.log --pid-file=/var/lib/mysql/localhost.localdomain.pid --socket=/var/lib/mysql/mysql.sock
    root      2061  0.0  0.0 103256   840 pts/0    S+   15:47   0:00 grep mysql
    [root@localhost ~]# kill 1586
    [root@localhost ~]# service mysql status
    MySQL is not running, but lock file (/var/lock/subsys/mysql[失败]ts
    [root@localhost ~]# service mysql start
    Starting MySQL.                                            [确定]
    [root@localhost ~]# service mysql status
    MySQL running (2318)                                       [确定]
    [root@localhost ~]# mysql -uroot -p123456  
    Warning: Using a password on the command line interface can be insecure.
    Welcome to the MySQL monitor.  Commands end with ; or \g.
    Your MySQL connection id is 1
    Server version: 5.6.34 MySQL Community Server (GPL)
    
    Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
    
    Oracle is a registered trademark of Oracle Corporation and/or its
    affiliates. Other names may be trademarks of their respective
    owners.
    
    Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
    
    mysql> 
    
    

    常用命令:

    1. 启动mysql: service mysql start
    2. 查看mysql状态:service mysql status
    3. 查看那进程状态:ps aux | grep mysql
    4. 干掉进程:kill xxx
    5. 登录mysql :mysql -uroot -p12345

    相关文章

      网友评论

          本文标题:Mysql碰到的一些问题

          本文链接:https://www.haomeiwen.com/subject/sbdnnftx.html