0

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?

Patoshi パトシ
  • 1,695
  • 6
  • 24
  • 34

2 Answers2

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
  • 16,541
  • 5
  • 32
  • 44
0

service mysql stop should work. But perhaps you should gain ome basic understanding of linux before using it.

Nils
  • 18,202
  • 11
  • 46
  • 82