DongJin Oh
DongJin Oh

Reputation: 119

How can I start mysql by command service mysql start

I can start mysql by following command

/etc/init.d/mysql.server start

But I want to start it by command "service mysql start"

Server is debian 10.

Mariadb, which was originally installed, was uninstalled and mysql 5.5 was reinstalled.

Upvotes: 0

Views: 1032

Answers (2)

Clay
Clay

Reputation: 162

Using sysvinit, the service name should be the name of the file inside /etc/init.d. In your case, the file name is mysql.server, so "sudo service mysql.server start{stop, status, restart}" should be the command used. If it isn't referenced anywhere else, you could even rename the file from "mysql.server" to "mysql" and just run "sudo service mysql start".

Upvotes: 0

Gilles Quénot
Gilles Quénot

Reputation: 185790

The proper way for debian10 is now:

systemctl start mysql.service

Upvotes: 1

Related Questions