Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MySql ERROR! The server quit without updating PID file [closed]

Tags:

mysql

I inherited a computer that previously had MySql server installed and then uninstalled (apparently, it ran fine before the uninstall). I am in Database class, so I tried to install it again and now I get the error:

Starting MySQL . ERROR! The server quit without updating PID file (/usr/local/mysql/data/Computer.local.pid).

I looked online and saw this error happened to others, but either a)I couldn't figure out how to do the fix or b)the fix didnt work for me.

I tried(from http://coolestguidesontheplanet.com/mysql-error-server-quit-without-updating-pid-file/):

Computer:/ computer$ /usr/local/mysql/support-files/mysql.server restart

And I get this error: ERROR! MySQL server PID file could not be found! Starting MySQL

. ERROR! The server quit without updating PID file (/usr/local/mysql/data/Computer.local.pid).

I am not sure what they are telling me to do here:

Remove /etc/my.cnf or just back it up for now and restart: sudo mv /etc/my.cnf /etc/my.cnf.bak

because I get this error when I type:

Computer:/ computer$ cd /usr/my.cnf

-bash: cd: /usr/my.cnf: No such file or directory

I also see from: mysql ERROR! The server quit without updating PID file? That there are error logs and the my.cnf file, but I am not sure to access them.


The MySql I downloaded: mysql-5.7.10-osx10.9-x86_64.dmg

I am on a mac version 10.7.5

Thanks!

like image 288
JFQue3316 Avatar asked Jan 27 '16 00:01

JFQue3316


People also ask

Where is the MySQL pid file?

To check the PID file for the mysqld node: the default location for it is the data directory of the node, specified by the datadir option in either a configuration file or at the command line at the start of the mysqld process.

What is PID file in MySQL?

The MySQL PID file is a process identification file that stores the Process ID number of the running MySQL instance. Each time you issue a command to mysql. server , MySQL would look for the PID file to find the Process ID and forward the command to the right process number.


1 Answers

Mostly this is a permission issue

Step1: Check the error file first.

tail -f /usr/local/mysql/data/*.err

Step2: Do a complete shut down or kill the process. Confirm that no mysql process is running

mysqladmin -uroot shutdown
sudo killall mysqld 

ps -ef | grep mysql

Step3: Give permisiions

sudo chown -RL root:mysql /usr/local/mysql
sudo chown -RL mysql:mysql /usr/local/mysql/data
chmod -R 755 /usr/local/mysql/data

Step4: Start mysql

sudo mysql.server start
like image 120
koustuv Avatar answered Oct 20 '22 07:10

koustuv