On 28/11/2024 18:52, Bitfox wrote:
HelloAfter I installed mysql 8.0 via apt install mysql-server, I tried to restart mysql server.I issued the following commands, systemctl restart mysql-server systemctl restart mysqld They got failed, no package was found. Then I run systemctl restart mysql it successed finally.My question is how I can know the installed package name rather than by guessing?
I can think of a couple of options:* "dpkg -L mysql-server" will give you a list of files installed by that package. If you're lucky, one of those will be a .service file. However, I happen to know that "mysql-server" is a dependency package which will actually pull in the latest version of the server (I'll take your word for it that it's 8.0)
* "systemctl list-units --all" will list all the services installed on your system. You can search that for something likely looking (e.g. something beginning with "mysql" or similar).
Thanks
OpenPGP_signature.asc
Description: OpenPGP digital signature