ERROR! MySQL manager or server PID file could not be found! QNAP

前端 未结 18 1242
慢半拍i
慢半拍i 2020-12-07 16:38

I am having an issue where MySQL isn\'t starting on my QNAP NAS.

I found this first by not being able to log in through phpMyAdmin - was getting error:



        
相关标签:
18条回答
  • 2020-12-07 16:52

    I know this is an older post, but I ran into the ERROR! MySQL server PID file could not be found! when trying to start MySQL after making an update to my.cnf file. I did the following to resolve the issue:

    1. Deleted my experimental update to my.cnf

    2. Deleted the .net.pid and .net.err files.

    delete /usr/local/var/mysql/**<YourUserName>**-MBP.airstreamcomm.net.*
    
    1. Ensured all MySQL processes are stopped.
    ps -ax | grep mysql
    kill **<process id>**
    
    1. Started MySQL server as normal.
    mysql.server start
    
    0 讨论(0)
  • 2020-12-07 16:54

    First find PID of mysql service

    ps aux | grep mysql
    

    Then, you have to kill process

     sudo kill <pid>
    

    After you again start mysql service

    mysql.server start
    
    0 讨论(0)
  • 2020-12-07 16:55

    Run the below commands and it will work.

    Go to terminal and type

    sudo chown -RL root:mysql /usr/local/mysql
    
    sudo chown -RL mysql:mysql /usr/local/mysql/data
    
    sudo /usr/local/mysql/support-files/mysql.server start
    
    0 讨论(0)
  • 2020-12-07 16:55

    ERROR! MySQL server PID file could not be found!

    This might be due to issues with disk space, disk inode usage or innodb corruption which may lead to the error.

    The issue was with the pid file and the solution was:

    1. SSH login to server as a root

    2. Create directory /var/run/mysql

    mkdir /var/run/mysql

    3) Create a file with name as mysqld.pid

    touch mysqld.pid

    1. Change its ownership and group to mysql:mysql

      chown mysql:mysql mysqld.pid

    2. Restart MySQL service

    Done!

    0 讨论(0)
  • 2020-12-07 16:56

    After a lot of searching, I was able to fix the "PID file cannot be found" issue on my machine. I'm on OS X 10.9.3 and installed mysql via Homebrew.

    First, I found my PID file here:

    /usr/local/var/mysql/{username}.pid
    

    Next, I located my my.cnf file here:

    /usr/local/Cellar/mysql/5.6.19/my.cnf
    

    Finally, I added this line to the bottom of my.cnf:

    pid-file = /usr/local/var/mysql/{username}.pid
    

    Hopefully this works for someone else, and saves you a headache! Don't forget to replace {username} with your machine's name (jeffs-air-2 in my case).

    0 讨论(0)
  • 2020-12-07 16:57

    Check if your server is full first, thats a common reason (can't create the PID file because you have no space). Run this to check your disk usage..

    df -h
    

    If you get something like this, you are full..

    Filesystem      Size  Used Avail Use% Mounted on
    /dev/vda1        40G   40G  6.3M 100% /
    

    In that case, you need to start looking for what to delete to make room, or add an additional drive to your server.

    0 讨论(0)
提交回复
热议问题