sudo systemctl start mssql-server -- on WSL2 Ubuntu

Ramesh Chandra RC 21 Reputation points
2021-03-07T18:40:24.24+00:00

$ sudo systemctl start mssql-server System has not been booted with systemd as init system (PID 1). Can't operate. I installed mssql server by following https://learn.microsoft.com/en-us/sql/linux/quickstart-install-connect-ubuntu?view=sql-server-ver15 on WSL2 on Windows 10 pro. Can someone help me resolve this issue.

SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
9,865 questions
0 comments No comments
{count} votes

Accepted answer
  1. CathyJi-MSFT 20,981 Reputation points Microsoft Vendor
    2021-03-08T03:27:54.923+00:00

    Hi @Ramesh Chandra RC ,

    Quote from the blog Dealing with SQL Server on Linux on WSL2,

    I would say you can use your new fresh installed SQL Server instance, but it requires to manually start / stop it because there are no systemctl commands to handle it. A good alternative could be to rely on init scripts and start-stop-daemon wrapped into LSB-compliant init scripts.

    Suggest you read the blog to get the detail steps to resolve the issue.


    If the response is helpful, please click "Accept Answer" and upvote it, thank you.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Ramesh Chandra RC 21 Reputation points
    2021-03-08T09:38:16.583+00:00

    Thank you for the response - I removed mssql packages. I re installed a fresh copy. By following https://blog.developpez.com/mikedavem/p13196/sql-server-2012/dealing-with-sql-server-on-linux-on-wsl2
    I get error at below point.

    75400-image.png

    0 comments No comments