This morning I get up to a date where all db on my dedicated server down. I couldn't restart the service. When I do ps aux | grep mysql I see a process which pid changes constantly.
root 4715 0.0 0.0 103248 844 pts/0 S+ 08:28 0:00 grep mysql
So I stop running on boot and restarted the server.
chkconfig --list mysql shows me
mysql 0:off 1:off 2:off 3:off 4:off 5:off 6:off
But I still see mysql process on ps. Why?
Server OS: CentOS.
Panel: WHM
What you're seeing is the grep process running. mysql is not running.
The entry you're seeing is the command you are using to search for MySQL.
To test this try doing:
ps aux | grep banana
Related
I have just installed XAMPP, and I cannot run MySQL Database on Mac OS M1.
I have tried multiple things I have found online so far. First, I downloaded the 8.1.6 / PHP 8.1.6 (361 Mb) and I couldn't even start it, then I downloaded the 163 Mb version and everything seemed fine, except that I cannot run the database.
I have tried everything from here, but it didn't work.
I couldn't find the ID either, after running
ps aux | grep mysql
I got:
_mysql 22508 0.0 1.1 34989944 178672 ?? Ss 3:39PM 0:00.30 /usr/local/mysql/bin/mysqld --user=_mysql --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data --plugin-dir=/usr/local/mysql/lib/plugin --log-error=/usr/local/mysql/data/mysqld.local.err --pid-file=/usr/local/mysql/data/mysqld.local.pid --keyring-file-data=/usr/local/mysql/keyring/keyring --early-plugin-load=keyring_file=keyring_file.so
root 23300 0.0 0.0 408628368 1648 s000 S+ 3:41PM 0:00.00 grep mysql
sh-3.2#
Server events:
Starting Apache Web Server...
/Applications/XAMPP/xamppfiles/apache2/scripts/ctl.sh : httpd started
Starting ProFTPD...
Checking syntax of configuration file
/Applications/XAMPP/xamppfiles/proftpd/scripts/ctl.sh : proftpd started
Stopping all servers...
Stopping Apache Web Server...
/Applications/XAMPP/xamppfiles/apache2/scripts/ctl.sh : httpd stopped
Stopping ProFTPD...
Checking syntax of configuration file
/Applications/XAMPP/xamppfiles/proftpd/scripts/ctl.sh : proftpd stopped
Could someone help me with this, please?
Thank you.
I know that there is dozens of articles about this but none of them works for me. I've tried everything, install mysql from official site, from brew, and always have the sam problem:
ERROR MySQL server PID file could not be found
tried to change permissions for directories, change sources, moving and recreating my.cnf file, etc. nothing works. I'm powerless...
I have oSX Sierra 10.12.2 and i've installed mysql-5.7.17. Maybe some of you found solution for this setup, configuration... Much thx for help and don't removing this question.
This question is outdated but still a relevant issue, which I solved on my MacBook running macOS High Sierra (Version 10.13.2).
Run the following command:
mysql.server status
Should return: ERROR! MySQL is running but PID file could not be found
To resolve the issue, find all running MySQL instances
ps aux | grep mysql
This will list the processes using MySQL, listing results similar to below:
1768 0.0 0.0 4267768 896 s000 S+ 12:08am 0:00.00 grep
mysql
End ALL the MySQL pids returned:
sudo kill <pid1> <pid2> <pid3> ...
This should kill off all the mysql processes
Now try to starting MySQL again...
mysql.server start
Starting MySQL . SUCCESS!
Hopefully this will save someone hours of endless Googling!
sudo chown -R mysql:mysql /usr/local/mysql/data/*
sudo apachectl restart
sudo /usr/local/mysql/support-files/mysql.server start
I had this issue as well. Followed some instructions from here.
MySQL already running, but when open http://localhost/phpmyadmin/ I get error like this :
#2002 - Connection refused The server is not responding (or the local server's socket is not correctly configured).
when I try run from command line with sudo /opt/lampp/lampp start, I get the message like this :
XAMPP: Starting Apache...ok.
XAMPP: Starting MySQL...already running.
I have checked in ps -aux | grep mysqld
I get message like this:
ahmadso+ 7118 0.0 0.0 15948 2220 pts/6 S+ 09:23 0:00 grep --color=auto mysqld
when I try sudo service mysql stop
I get message like this :
stop: Unknown instance:
I use Ubuntu operating system, I have tried to uninstall and reinstall xampp, but does not resolve the issue.
please help me.
Try stopping all XAMPP Services and then start them again:
Stop
sudo service apache2 stop
sudo service mysql stop
Start
sudo service apache2 start
sudo service mysql start
I have freshly installed xampp-linux-1.8.1 on my Ubuntu 12.04 (Mint 13 maya) Operating system.
When run lampp, I get :
/opt/lampp/lampp start
Starting XAMPP for Linux 1.8.1...
XAMPP: XAMPP-Apache is already running.
XAMPP: Another MySQL daemon is already running.
XAMPP: XAMPP-ProFTPD is already running.
XAMPP for Linux started.
In the : localhost/xampp/
MySQL DataBase is Deactivated !!!
ps -aux | grep 'mysql'
Warning: bad ps syntax, perhaps a bogus '-'? See http://procps.sf.net/faq.html mysql 3159 0.0 0.9 316264 31880 ? Ssl 16:48 0:00 /usr/sbin/mysqld
root 4745 0.0 0.0 4648 840 pts/5 S+ 17:02 0:00 grep --color=auto mysql
When I tried to stop /usr/sbin/mysqld but it can't be stopped with this command !!!
/usr/sbin/mysqld stop
Please I need Help, Thanks.
i've resolved the issue in this way:
sudo chmod -R 777 /opt/lampp
sudo chown -hR nobody /opt/lampp
sudo chmod -R 755 /opt/lampp
then stop other mysqld running with:
sudo service mysql stop
Also had this issue, after troubleshooting for almost 2 hours I found that it was because of other Apache and MySQL packages also running on my system. Removed all Apache and MySQL packages and reinstalled XAMPP again. Success.
How can i make mysql start every time the system boot ? I need that in a dedicated server(ubuntu distro) in which i have my blog, but every time the server goes down, on booting mysql is stopped.
Btw i can use only command line.
update-rc.d allows setting init script links on Ubuntu and Debian Linux systems to control what services are run by init when entering various runlevels. It should be able to add mysql to the list of services to run at boot:
sudo update-rc.d mysql defaults
If you later want to disable running mysql on bootup:
sudo update-rc.d mysql remove
You can do it by using sysv-rc-conf, on debian based you can install it with sudo apt-get install sysv-rc-conf
then you can choose what start at boot with a simple X on the name of the deamon, all via command line
Run the following command to see your mysql current status:
/sbin/chkconfig mysqld --list
it will return a line such as below:
mysqld 0:off 1:off 2:off 3:off 4:off 5:off 6:off
to make mysql start every time the system boots, type the following:
sudo /sbin/chkconfig mysqld on
Result now from '--list' is:
mysqld 0:off 1:off 2:on 3:on 4:on 5:on 6:off
No answer helped. Finally chkconfig and update-rc.d did not work with MySQL on my machine.
Solution, I had a file /etc/init/mysql.override which contained
manual
i just deleted that file
$ sudo rm /etc/init/mysql.override
Deleting
/etc/init/mysql.override
did the job in my case (HostEurope VPS with Ubuntu 12.04)
I had the same problem, so I checked how I disabled it in the first place:
https://askubuntu.com/questions/138487/how-to-keep-apache-and-mysql-from-starting-automatically
Check your /etc/init/mysql.conf to make sure you don't have start on commented out (like I did).
# MySQL Service
description "MySQL Server"
author "Mario Limonciello <superm1#ubuntu.com>"
start on runlevel [2345]
stop on starting rc RUNLEVEL=[016]
...
Rebooted the machine and it works.
$ sudo service mysql status
mysql start/running, process 972
Use the chkconfig command as per the manpage http://manpages.ubuntu.com/manpages/maverick/man8/chkconfig.8.html
Another place to look for clues as to what is and isn't starting at boot time...
/etc/init.d/.depend.start (and its buddy at shutdown time, .depend.stop)
Here's a little more info http://www.pyenet.co.nz/2-202-1-customising-system-startup-and-boot-processes/
I had 2 servers - after booting, 1 would have mysql running, the other not so much.
On the box where mysql was starting at boot time:
chkconfig wasn't even installed
there were zero links from any scripts in /etc/rc?.d/* back to /etc/init.d/mysql
BUT... /etc/init.d/.depend.start contained:
TARGETS = halt apache2 umountfs umountnfs.sh sendsigs networking umountroot reboot killprocs unattended-upgrades urandom mysql mdadm dns-clean landscape-client pppd-dns sysstat rsync sudo postfix single grub-common ondemand rc.local
INTERACTIVE = apache2
postfix: mysql
single: killprocs dns-clean pppd-dns
grub-common: apache2 unattended-upgrades postfix mysql mdadm dns-clean landscape-client pppd-dns sysstat rsync sudo
ondemand: apache2 unattended-upgrades postfix mysql mdadm dns-clean landscape-client pppd-dns sysstat rsync sudo
rc.local: apache2 unattended-upgrades postfix mysql mdadm dns-clean landscape-client pppd-dns sysstat rsync sudo
When I simply copied this file over to the problem server, and rebooted, mysql was up & running.
With Debian 9, I installed MySQL today and typed "reboot" and mysqld restarted automatically. Also rebooted from my VPS dashboard, mysqld restarted automatically. In short, if you have Debian 9, there's nothing extra to do, it just works.