
windows
🚀
linux
🚀
wsl
🚀
php
🚀
Windows Dev Box Try 3 2020
title: "Windows Dev Box Try 3 2020"
date: 2020-05-25
hero: /images/heros/hero-office.png
menu:
sidebar:
name: "Windows Dev Box Try 3 2020"
identifier: windows--dev--box--try-3-2020
weight: -267
tags: [windows, linux, wsl, php]
Yes this is try number 3. See here for the first 2 goes at it.
With WSL2 out and a great laptop I wanted to give this another try.
MariaDB
Even though the install is super simple see https://alfrednutile.info/posts/267
I still end up having to do:
$ sudo mysql -u root # I had to use "sudo" since is new installation
mysql> USE mysql;
mysql> UPDATE user SET plugin='mysql_native_password' WHERE User='root';
mysql> FLUSH PRIVILEGES;
mysql> exit;
$ service mysql restart
To allow me to then use this command, for example maraidb -uroot -proot
otherwise I have "Error connecting on localhost" type errors.
If using MySQL this worked really well here
Xdebug
Using my previous notes in the above post and https://gcompagnon.github.io/wsl2/xdebug/vscode/php-fpm/2019/09/17/WSL2_php_VSCode_Xdebug.html
I removed the reference to the host:
[xdebug]
xdebug.remote_enable=1
xdebug.remote_autostart=1
xdebug.remote_handler=dbgp
xdebug.remote_port=9009
xdebug.remote_log = /var/log/xdebug.log
in Visual Code my launch.json ended up looking like this:
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Listen for XDebug",
"type": "php",
"request": "launch",
"hostname": "0.0.0.0",
"port": 9009
},
{
"name": "Launch currently open script",
"type": "php",
"request": "launch",
"program": "${file}",
"hostname": "0.0.0.0",
"cwd": "${fileDirname}",
"port": 9009
}
]
}