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?
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
service mysql stop should work. But perhaps you should gain ome basic understanding of linux before using it.