I installed centos and now I want to get into mysql via the command line, but I forgot my root password for mysql as its not the same as the root password I made to login to the system. I googled and it told me to stop the mysql service to do a password reset, but I dont know where it is. What do I need to type to find out where a service is installed so i can stop it?
Asked
Active
Viewed 44 times
2 Answers
1
On CentOS the way to start/stop service is next:
service mysqld start
service mysqld stop
P.S. If your version is 7 you can use:
systemctl start mysqld
systemctl stop mysqld

Romeo Ninov
- 17,484
0
service mysql stop
should work. But perhaps you should gain ome basic understanding of linux before using it.

Nils
- 18,492
-
-
@duckx http://unix.stackexchange.com/q/238/11083 is a similar Q with many good answers. – Nils Jun 01 '15 at 19:04
systemctl (start/stop) mysqld
– Eric Renouf May 31 '15 at 17:46