0

I'm trying to restart my mysqld process on CentOS 6.6. I have root access to the server and when I run top, this is the first line:

 PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
3874 mysql     15   0 2859m 336m 7188 S 120.5 16.4  74730:50 mysqld

Clearly there is an issue there (and I may need to increase the DB server since it's maxing out) but the first step I want to take is to put the process through a power cycle to restart it since it hasn't been restarted in a very long time.

I've tried as root to do many different processes:

service mysqld restart (I get service not found)

If I run which mysqld I get /usr/sbin/mysqld . I tried:

/usr/sbin/mysqld restart

That didn't work. I tried:

/etc/init.d/mysqld restart

That didn't work. Do I need to be logged in as the mysql user to do this? I figured root would be able to do this but I guess I just can't find the correct way to restart the server.

Thanks for your help!

2
  • Did you try killall mysqld first? Or killall -s 9 mysqld. Jul 16, 2016 at 11:01
  • do you actually have the init script in /etc/init.d? what error did it throw (if any?) Jul 18, 2016 at 16:58

2 Answers 2

1

The correct command to restart a MySql service is:

$ service mysql restart

Please confirm the status of the service by typing $ service mysql status

2
  • Service not found. Jul 18, 2016 at 19:10
  • I think re-installing msql might fix your issue. Jul 19, 2016 at 3:37
0

You might want to copy back the init script for MySQL server from source file.

Take a look to this link: http://dev.mysql.com/doc/refman/5.7/en/mysql-server.html

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .