Level 50
Have you installed all the required PHP extensions in WSL? You can check installed extensions by running php -m.
I think you also need the pdo_mysql extension to use mysql.
1 like
I followed ChatGPT steps and got into this...
ipconfig
Windows IP Configuration
Ethernet adapter Ethernet:
Connection-specific DNS Suffix . :
IPv4 Address. . . . . . . . . . . : 192.168.100.2
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 192.168.100.1
Ethernet adapter vEthernet (WSL (Hyper-V firewall)):
Connection-specific DNS Suffix . :
Link-local IPv6 Address . . . . . : fe80::19ba:da1:a410:74fd%19
IPv4 Address. . . . . . . . . . . : 172.31.128.1
Subnet Mask . . . . . . . . . . . : 255.255.240.0
Default Gateway . . . . . . . . . :
.env
DB_CONNECTION=mysql
DB_HOST=192.168.100.2
DB_PORT=3306
DB_DATABASE=ecommerce
DB_USERNAME=developer2
DB_PASSWORD=pw
my.ini
bind: 192.168.100.2
I go to WSL project directory and call php artisan migrate getting:
could not find driver (Connection: mysql, SQL: select table_name as `name`, (data_length + index_length) as `size`, table_comment as `comment`, engine as `engine`, table_collation as `collation` from information_schema.tables where table_schema = 'ecommerce' and table_type in ('BASE TABLE', 'SYSTEM VERSIONED') order by table_name)
Please or to participate in this conversation.