Post History
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...
#4: Post edited
- 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
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
- 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
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).