Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Q&A

Post History

60%
+1 −0
Q&A How to start MariaDB (or MySQL) server on a WSL using systemctl?

When I try to start MariaDB server (same problem with MySQL) on a fresh Debian 11 install in a Windows Subsystem Linux (WSL) I got the following error: $ sudo systemctl start mariadb System has n...

2 answers  ·  posted 1y ago by zetyty‭  ·  last activity 1y ago by matthewsnyder‭

#4: Post edited by user avatar zetyty‭ · 2023-07-11T13:33:35Z (over 1 year ago)
add "1" after all WSL statment
  • When I try to start MariaDB server (same problem with MySQL) on a fresh Debian 11 install in a Windows Subsystem Linux (WSL) I got the following error:
  • ```
  • $ sudo systemctl start mariadb
  • System has not been booted with systemd as init system (PID 1). Can't operate.
  • Failed to connect to bus: Host is down
  • ```
  • However the following command to enable MariaDB seems to work:
  • ```
  • $ sudo systemctl enable mariadb
  • Synchronizing state of mariadb.service with SysV service script with /lib/systemd/systemd-sysv-install.
  • Executing: /lib/systemd/systemd-sysv-install enable mariadb
  • ```
  • I've tried some things like adding `[boot] systemd=true` to /etc/wsl.conf ([find here](https://askubuntu.com/questions/1379425/system-has-not-been-booted-with-systemd-as-init-system-pid-1-cant-operate)) but the error persists.
  • # Set up
  • I've tested with a fresh install of Debian WSL installed from the Microsoft Store (Debian GNU/Linux 11 bullseye) on a Windows 10 Professionnel (version 22H2) host and MariaDB installed with `sudo apt install mariadb-server`.
  • I have exactly the same problem on a Ubuntu 22.04.2 LTS WSL and Fedora Linux 38 (Container Image) WSL (with MySQL), with both installed from the Microsoft Store.
  • # Context
  • I try to "set up a new (development) instance of Codidact/QPixel" on a WSL following [this workflow](https://collab.codidact.org/posts/280451/280452#answer-280452).
  • When I try to start MariaDB server (same problem with MySQL) on a fresh Debian 11 install in a Windows Subsystem Linux (WSL) I got the following error:
  • ```
  • $ sudo systemctl start mariadb
  • System has not been booted with systemd as init system (PID 1). Can't operate.
  • Failed to connect to bus: Host is down
  • ```
  • However the following command to enable MariaDB seems to work:
  • ```
  • $ sudo systemctl enable mariadb
  • Synchronizing state of mariadb.service with SysV service script with /lib/systemd/systemd-sysv-install.
  • Executing: /lib/systemd/systemd-sysv-install enable mariadb
  • ```
  • I've tried some things like adding `[boot] systemd=true` to /etc/wsl.conf ([find here](https://askubuntu.com/questions/1379425/system-has-not-been-booted-with-systemd-as-init-system-pid-1-cant-operate)) but the error persists.
  • # Set up
  • I've tested with a fresh install of Debian WSL1 installed from the Microsoft Store (Debian GNU/Linux 11 bullseye) on a Windows 10 Professionnel (version 22H2) host and MariaDB installed with `sudo apt install mariadb-server`.
  • I have exactly the same problem on a Ubuntu 22.04.2 LTS WSL1 and Fedora Linux 38 (Container Image) WSL1 (with MySQL), with both installed from the Microsoft Store.
  • # Context
  • I try to "set up a new (development) instance of Codidact/QPixel" on a WSL following [this workflow](https://collab.codidact.org/posts/280451/280452#answer-280452).
#3: Post edited by user avatar zetyty‭ · 2023-07-02T19:01:37Z (over 1 year ago)
typo
  • When I try to start MariaDB server (same problem with MySQL) on a fresh Debian 12 install in a Windows Subsystem Linux (WSL) I got the following error:
  • ```
  • $ sudo systemctl start mariadb
  • System has not been booted with systemd as init system (PID 1). Can't operate.
  • Failed to connect to bus: Host is down
  • ```
  • However the following command to enable MariaDB seems to work:
  • ```
  • $ sudo systemctl enable mariadb
  • Synchronizing state of mariadb.service with SysV service script with /lib/systemd/systemd-sysv-install.
  • Executing: /lib/systemd/systemd-sysv-install enable mariadb
  • ```
  • I've tried some things like adding `[boot] systemd=true` to /etc/wsl.conf ([find here](https://askubuntu.com/questions/1379425/system-has-not-been-booted-with-systemd-as-init-system-pid-1-cant-operate)) but the error persists.
  • # Set up
  • I've tested on a fresh install of Debian WSL installed from the Microsoft Store (Debian GNU/Linux 11 bullseye) on a Windows 10 Professionnel (version 22H2) host and MariaDB installed with `sudo apt install mariadb-server`.
  • I have exactly the same problem on a Ubuntu 22.04.2 LTS WSL and Fedora Linux 38 (Container Image) WSL (with MySQL), with both installed from the Microsoft Store.
  • # Context
  • I try to "set up a new (development) instance of Codidact/QPixel" on a WSL following [this workflow](https://collab.codidact.org/posts/280451/280452#answer-280452).
  • When I try to start MariaDB server (same problem with MySQL) on a fresh Debian 11 install in a Windows Subsystem Linux (WSL) I got the following error:
  • ```
  • $ sudo systemctl start mariadb
  • System has not been booted with systemd as init system (PID 1). Can't operate.
  • Failed to connect to bus: Host is down
  • ```
  • However the following command to enable MariaDB seems to work:
  • ```
  • $ sudo systemctl enable mariadb
  • Synchronizing state of mariadb.service with SysV service script with /lib/systemd/systemd-sysv-install.
  • Executing: /lib/systemd/systemd-sysv-install enable mariadb
  • ```
  • I've tried some things like adding `[boot] systemd=true` to /etc/wsl.conf ([find here](https://askubuntu.com/questions/1379425/system-has-not-been-booted-with-systemd-as-init-system-pid-1-cant-operate)) but the error persists.
  • # Set up
  • I've tested with a fresh install of Debian WSL installed from the Microsoft Store (Debian GNU/Linux 11 bullseye) on a Windows 10 Professionnel (version 22H2) host and MariaDB installed with `sudo apt install mariadb-server`.
  • I have exactly the same problem on a Ubuntu 22.04.2 LTS WSL and Fedora Linux 38 (Container Image) WSL (with MySQL), with both installed from the Microsoft Store.
  • # Context
  • I try to "set up a new (development) instance of Codidact/QPixel" on a WSL following [this workflow](https://collab.codidact.org/posts/280451/280452#answer-280452).
#2: Post edited by user avatar zetyty‭ · 2023-07-02T05:58:04Z (over 1 year ago)
adding "" arrround the text "set up a new (development) instance of Codidact/QPixel"
  • When I try to start MariaDB server (same problem with MySQL) on a fresh Debian 12 install in a Windows Subsystem Linux (WSL) I got the following error:
  • ```
  • $ sudo systemctl start mariadb
  • System has not been booted with systemd as init system (PID 1). Can't operate.
  • Failed to connect to bus: Host is down
  • ```
  • However the following command to enable MariaDB seems to work:
  • ```
  • $ sudo systemctl enable mariadb
  • Synchronizing state of mariadb.service with SysV service script with /lib/systemd/systemd-sysv-install.
  • Executing: /lib/systemd/systemd-sysv-install enable mariadb
  • ```
  • I've tried some things like adding `[boot] systemd=true` to /etc/wsl.conf ([find here](https://askubuntu.com/questions/1379425/system-has-not-been-booted-with-systemd-as-init-system-pid-1-cant-operate)) but the error persists.
  • # Set up
  • I've tested on a fresh install of Debian WSL installed from the Microsoft Store (Debian GNU/Linux 11 bullseye) on a Windows 10 Professionnel (version 22H2) host and MariaDB installed with `sudo apt install mariadb-server`.
  • I have exactly the same problem on a Ubuntu 22.04.2 LTS WSL and Fedora Linux 38 (Container Image) WSL (with MySQL), with both installed from the Microsoft Store.
  • # Context
  • I try to set up a new (development) instance of Codidact/QPixel on a WSL following [this workflow](https://collab.codidact.org/posts/280451/280452#answer-280452).
  • When I try to start MariaDB server (same problem with MySQL) on a fresh Debian 12 install in a Windows Subsystem Linux (WSL) I got the following error:
  • ```
  • $ sudo systemctl start mariadb
  • System has not been booted with systemd as init system (PID 1). Can't operate.
  • Failed to connect to bus: Host is down
  • ```
  • However the following command to enable MariaDB seems to work:
  • ```
  • $ sudo systemctl enable mariadb
  • Synchronizing state of mariadb.service with SysV service script with /lib/systemd/systemd-sysv-install.
  • Executing: /lib/systemd/systemd-sysv-install enable mariadb
  • ```
  • I've tried some things like adding `[boot] systemd=true` to /etc/wsl.conf ([find here](https://askubuntu.com/questions/1379425/system-has-not-been-booted-with-systemd-as-init-system-pid-1-cant-operate)) but the error persists.
  • # Set up
  • I've tested on a fresh install of Debian WSL installed from the Microsoft Store (Debian GNU/Linux 11 bullseye) on a Windows 10 Professionnel (version 22H2) host and MariaDB installed with `sudo apt install mariadb-server`.
  • I have exactly the same problem on a Ubuntu 22.04.2 LTS WSL and Fedora Linux 38 (Container Image) WSL (with MySQL), with both installed from the Microsoft Store.
  • # Context
  • I try to "set up a new (development) instance of Codidact/QPixel" on a WSL following [this workflow](https://collab.codidact.org/posts/280451/280452#answer-280452).
#1: Initial revision by user avatar zetyty‭ · 2023-07-02T05:52:31Z (over 1 year ago)
How to start MariaDB (or MySQL) server on a WSL using systemctl?
When I try to start MariaDB server (same problem with MySQL) on a fresh Debian 12 install in a Windows Subsystem Linux (WSL) I got the following error:

```
$ sudo systemctl start mariadb
System has not been booted with systemd as init system (PID 1). Can't operate.
Failed to connect to bus: Host is down
```
However the following command to enable MariaDB seems to work:

```
$ sudo systemctl enable mariadb
Synchronizing state of mariadb.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable mariadb
```

I've tried some things like adding `[boot] systemd=true` to /etc/wsl.conf ([find here](https://askubuntu.com/questions/1379425/system-has-not-been-booted-with-systemd-as-init-system-pid-1-cant-operate)) but the error persists.

# Set up
I've tested on a fresh install of Debian WSL installed from the Microsoft Store (Debian GNU/Linux 11 bullseye) on a Windows 10 Professionnel (version 22H2) host and MariaDB installed with `sudo apt install mariadb-server`.

I have exactly the same problem on a Ubuntu 22.04.2 LTS WSL and Fedora Linux 38 (Container Image) WSL (with MySQL), with both installed from the Microsoft Store.

# Context
I try to set up a new (development) instance of Codidact/QPixel on a WSL following [this workflow](https://collab.codidact.org/posts/280451/280452#answer-280452).