You are following generic MySQL instructions for a Linux setup when you are on a Raspberry Pi using Raspbian (I assume).
All that message means is the service named mysqld
is unrecognized by your system. It does not mean it has crashed or data was lost. It just means your OS doesn’t know what mysqld
is as far as services go. That’s it; nothing to panic about.
A quick Google search shows that Raspbian uses a different system service name simply known as mysql
. So to start it up again just run this command:
sudo service mysql start
And you should be good to go. Also note that whole command you ran to stop the service is overkill:
kill `cat /var/run/mysqld/mysqld.pid`
Running a kill
command like that should only happen when all other options are exhausted and you truly want to stop the database server. The way you should be stopping, starting and generally controlling the MySQL server is via the service
interface using a command like this:
sudo service mysql stop
And if you wanted to restart the service, just run this command:
sudo service mysql restart
Past any of that if you are stuck with an “unrecognized service” message, then you can always check the stuff in the /etc/init.d
directory on your Linux machine like this:
ls -la /etc/init.d/
Look through that list and find the exact name of the service you need to do something with and then just run the service
command as outlined above.