genesisweb / valet-linux-plus

Advanced local development experience for Linux.
MIT License
143 stars 23 forks source link

Manjaro - Valet DB commands issue #73

Closed shomsy closed 1 year ago

shomsy commented 1 year ago

Hello,

Question, please. Do you know how I can solve this problem? I previously installed MariaDB and set up user privileges but I can't use any of these cool DB commands.

image

I couldn't even install MariaBD with valet install --mariadb , so I did it manually.

image

Any ideas?

shomsy commented 1 year ago

Oh, ok. The errors on the first screenshot are solved by loading the mysql_pdo extension (I forgot to reload PHP). The second one, installing MySQL, is still a problem. So the solution is to do it manually and ignore this error, you can start the Valet actually.

uttamrabadiya commented 1 year ago

@shomsy It seems your problem is resolved, but we are going to enhance this integration in our next release. Cloud you please share some more details such as your Operating System, PHP & Composer versions.

Thanks in advance!

cobraprojects commented 1 year ago

the issue is caused by this line: $this->pm->ensureInstalled("php{$phpVersion}-mysql"); as on archlinux no pacakge with that name

maually edit /home/cobra/.config/composer/vendor/genesisweb/valet-linux-plus/cli/Valet/Mysql.php

and comment these lines

if (!extension_loaded('mysql')) {
    $phpVersion = \PhpFpm::getVersion(true);
    $this->pm->ensureInstalled("php{$phpVersion}-mysql");
}

will solve the issue, as extension mysql is no longer needed

other solution is to enable mysql extension in your php.ini file

shomsy commented 1 year ago

I would say that in my case was that pacman can't install php-mysql, but yay can. So I did that step by myself

cobraprojects commented 1 year ago

yeah yay or paru would but not for all php versions if it's ok for you it might not work for others

shomsy commented 1 year ago

Sure, just described my problem from the images above :)

markovic-nikola commented 1 year ago

Same issue for me on Manjaro. I followed @cobraprojects workaround as a temporary solution.

Although, I already have PHP installed through Pacman. php 8.2.2-1 php-fpm 8.2.2-1

uttamrabadiya commented 1 year ago

We suggest to install php-mysql manually on Manjaro/Arch Linux, we just released an update to avoid installing it php-mysql for Pacman, so it won't be an issue while using valet install command. We will definitely look in detail on how we can extend package support for Arch Linux, but it may take bit more time as I am not much handy with Manjaro/Arch Linux.