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?

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
  • 1
    And on CentOS 7 you can use systemctl (start/stop) mysqld – Eric Renouf May 31 '15 at 17:46
0

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.