-
Notifications
You must be signed in to change notification settings - Fork 612
Working with WSL
Zach Toogood edited this page Feb 5, 2023
·
7 revisions
If you're going to build from WSL, it's better to clone your repo to somewhere like /home/
. It is incredibly slow to use /mnt/c/
.
WSL acts like another machine on your local network, so if you are hosting your database on your Windows machine but running your server processes in WSL, you'll need to configure things differently.
Find the information about your Windows machine:
cat /etc/resolv.conf
# This file was automatically generated by WSL. To stop automatic generation of this file, add the following entry to /etc/wsl.conf:
# [network]
# generateResolvConf = false
nameserver 172.18.64.1
NOTE: This IP appears to change on WSL startup, you'll have to come in here and fetch the new IP whenever it changes.
Set the IP found here in network.lua
settings.
xi.settings.network =
{
SQL_HOST = "172.18.64.1",
...
If you need to give your WSL instance permissions to use MariaDB, you can create a user for it (using ):
Get the IP of your WSL instance:
wsl hostname -I
Create a user at that IP:
CREATE USER 'root'@'172.30.167.123' IDENTIFIED BY 'root';
GRANT ALL PRIVILEGES ON *.* TO 'root'@'172.30.167.123' ;
FLUSH PRIVILEGES;